-1
我登錄後使用以下代碼,該代碼在5.4.1上工作,但現在不能按預期工作。從Facebook SDK v5.4遷移到alpha v6時出現問題
FacebookOAuthResult pResult;
if (m_pClient.TryParseOAuthCallbackUrl(e.Uri, out pResult))
{
if (pResult.IsSuccess)
{
//handle if success
}
else
{
//handle if failed
}
}
我將FacebookOAuthClient遷移到FacebookClient,遷移後的一切都無法工作。
我的登錄代碼如下。我已經嘗試了舊的方式和新的方式,但都不起作用。評論的部分是我的遺留代碼,爲5.4工作你能幫我看看我做錯了什麼?
//Dictionary<string, object> pParameters = new Dictionary<string, object>
//{
// {"response_type", "token"},
// {"display", "touch"},
//};
//if ((extendedPermissions != null) && (extendedPermissions.Length > 0))
//{
// StringBuilder pScope = new StringBuilder();
// pScope.Append(string.Join(",", extendedPermissions));
// pParameters["scope"] = pScope.ToString();
//}
此加入代碼V6
Uri pLoginUrl = m_pClient.GetLoginUrl(new { response_type = "token", display = "touch", scope = "publish_stream, offline_access", next = "https://www.facebook.com/connect/login_success.html" }); //also tried redirect_uri=""
m_pBrowser.Visibility = System.Windows.Visibility.Visible;
m_pBrowser.Navigate(pLoginUrl);
我回滾我的代碼到5.4版本,一切都在該版本中正常並按預期工作。我會等到v6超出alpha。 – 2012-02-27 15:33:58