我正在尝试使用以下代码调用FB autorize对话框:
//return true if is autologged
//return false if facebook login dialog is called
public boolean LoginAsync(Activity act)
{
m_strLastError="";
boolean bTryLogin= true;
if ((m_fbkey != null) && (m_fbkey.length() > 0))
{
facebook.setAccessToken(m_fbkey);
bTryLogin = !facebook.isSessionValid();
}
if (bTryLogin)
{
facebook.authorize(act, new String[] { "email", "offline_access", "publish_stream", "read_stream"}, new LoginDialogListener());
return false;
}
//"succesfull 'autologin'
return true;
}
当单击按钮时,它在测试应用程序中工作得很好,但当它移动到OnCreate时,它停止工作。对话框不再出现。只有一个空屏幕。在OnCreate中使用fajl是可能的吗?
发布于 2012-03-03 05:08:36
如果您调用登录并拥有有效的令牌,那么您将跳过登录表单,直接转到onComplete回调。
http://facebook.stackoverflow.com/questions/9130133/authorize-method-called-twice-for-facebook-on-android感谢麦克尼科尔斯。
https://stackoverflow.com/questions/9092473
复制相似问题