English 中文(简体)
Andersbook SDK - Failed to receive access token
原标题:Android Facebook SDK - Failed to receive access token

我试图用Facebook SDK在我的同仁中。 The snippet:

Facebook myFacebook = new Facebook("123456789012345");
myFacebook.authorize(LogInScreen.this, 
    new String[] {
        "publish_stream", 
        "email", 
        "user_about_me", 
        "user_birthday", 
        "user_website", 
        "friends_photos", 
        "user_photos"},
    Facebook.FORCE_DIALOG_AUTH,
    new DialogListener(){

        @Override
        public void onCancel() {
            Log.i("Facebook", "Facebook - cancel");
        }

        @Override
        public void onComplete(Bundle arg0) {
            Log.i("Facebook", "Facebook - complete, AccessToken: " + myFacebook.getAccessToken());
        }

        @Override
        public void onError(DialogError arg0) {
            Log.i("Facebook", "Facebook - error");
        }

        @Override
        public void onFacebookError(FacebookError error) {
            Log.i("Facebook", "Facebook - facebookError: " + error);
                    try {
                        myFacebook.logout(LogInScreen.this);
                    } catch (MalformedURLException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }}
    );
}
});

在我管理这部法典时,我可以与我的主面记一起记录,但当我试图使用任何其他假记时,我就错了“未能获得象征性的准入”。 我失踪了吗?

最佳回答

问题在于,面像被装到沙箱模式中,因此只有开发商的账户才能从 app子中获取。

问题回答

我也存在同样的问题,但沙箱是 t。 我对一些国家有一些限制,我国没有限制。 我补充说,它解决了我的问题。

If you put permission offline_access, the token expiry is 0.

提出这一问题的其他人(如果你提出<代码>不适用>-<>/编码>许可并随后删除)采取下列步骤:

  • Go to your facebook profile setting and remove your app.
  • and then do login again.
  • Give permission to your app again.

Alternately you can do this:

  • Go to your facebook profile setting > Apps > Your_App and remove "Access my data any time" permission.
  • Save changes made.
  • Re-run Your_App(i.e. with no offline_access permission now).

就我而言,问题是,我没有在“Facebook”评估组合中添加正确的基什。 我只添加了“金字号”而不是“生产”,并不断拿到“无法得到”错误。

The Key Hash can be obtained like this:

<条码>钥匙tool - Exportcert -alias KEY_AL -keys Store C_STORE.jks opensl sha1 -binERTarysl base64

正确无误地确保了别处、储存和密码。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签