为什么我的code与Facebook应用程序有问题? [英] Why might my code have a problem with the Facebook app?

查看:210
本文介绍了为什么我的code与Facebook应用程序有问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发展与Facebook的整合应用程序,并且在没有安装Facebook应用程序的设备可以正常使用,但它不工作与此应用程序的设备。我见过几个后这个样子,但我认为这个问题是不是在密钥工具的关键。

I am developing an app with Facebook integration, and it is working perfectly in devices without the Facebook app installed, but it is not working on devices with this app. I have seen several post like this, but i think the problem is not in the keytool key.

如果手机安装了FB应用它显示了autorization对话框,但一旦你autorized的应用程序,它什么都不做。我所看到的调试是它没有到​​达的on​​Complete方法:

If the phone has the FB app installed it shows the autorization dialog but once you have autorized the app, it does nothing. What i can see debugging is that it is not reaching the onComplete method:

private class LoginDialogListener implements DialogListener
{
    public void onComplete (Bundle values)
    {
        postOnFbWall ();
    }
    public void onFacebookError (FacebookError e)
    {
        // TODO Auto-generated method stub
        Toast t;
        t = Toast.makeText (getApplicationContext (), "Something went wrong! Try it later.", Toast.LENGTH_SHORT);
        t.show ();
    }
    public void onError (DialogError e)
    {
        // TODO Auto-generated method stub
        Toast t;
        t = Toast.makeText (getApplicationContext (), "Something went wrong!! Try again later.", Toast.LENGTH_SHORT);
        t.show ();
    }
    public void onCancel ()
    {
        // TODO Auto-generated method stub
    }
  }

任何解决方案?
非常感谢。

Any solution? Thanks a lot.

推荐答案

你有没有实施的onActivityResult()作为官方文档说明您的通话活动?

Have you implemented onActivityResult() in your calling activity as stated in the official doc?

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    facebook.authorizeCallback(requestCode, resultCode, data);
}

如果没有,则回调将永远不会被使用。
请参见的Facebook SDK为Android下的单点登录的STRONG>

这篇关于为什么我的code与Facebook应用程序有问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆