I am using the following code after I login, which worked on 5.4.1, but now it isn't working as expected.
FacebookOAuthResult pResult;
if (m_pClient.TryParseOAuthCallbackUrl(e.Uri, out pResult))
{
if (pResult.IsSuccess)
{
//handle if success
}
else
{
//handle if failed
}
}
I migrated the FacebookOAuthClient to FacebookClient and after migrating everything this does not work.
My login code is as follows. I have tried both the old way and the new way, but both are not working. The commented portion is my legacy code that worked for 5.4 Can you please help me see what I am doing wrong?
//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();
//}
this is code added for 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);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…