AccessToken token:ACCESS_TOKEN_REMOVED in Facebook Android SDK

后端 未结 5 1786
无人共我
无人共我 2021-02-04 23:52

I am using the Facebook SDK but I want to create the photo album but I am getting ACCESS_TOKEN_REMOVED in the session.

Getting this in session

{Session sta

相关标签:
5条回答
  • 2021-02-05 00:27

    If you are just seeing ACCESS_TOKEN_REMOVED in your log, make sure you are printing session.getAccessToken().getToken(). In the example above, replace

    Log.v(GlobalVars.TAG, "Token::" + session.getAccessToken());
    

    with

    Log.v(GlobalVars.TAG, "Token::" + session.getAccessToken().getToken());
    
    0 讨论(0)
  • 2021-02-05 00:31

    Same problem that i was facing from last 2 days and finally i get to know this. Facebook SDK will not log access tokens to logcat (to avoid leaking user tokens via the log as said in decsription).

    Just add these lines after FacebookSdk.sdkInitialize(), i would recomend you do this only in debug mode:

    if (BuildConfig.DEBUG) {
        FacebookSdk.setIsDebugEnabled(true);
        FacebookSdk.addLoggingBehavior(LoggingBehavior.INCLUDE_ACCESS_TOKENS);
    }
    
    0 讨论(0)
  • 2021-02-05 00:33

    I took the same problem :/

    You can check:

    1. Is appId correct?
    2. Was keyhash registered in facebook app center?
    3. Does app namespace / package name match with your manifest file? ( on facebook app center )
    4. Is application live?

    If everything is right I really don't know how to help you...

    0 讨论(0)
  • 2021-02-05 00:35

    I checked all items that Fernando said and add it

    Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
    

    I don't know if this last line was what solved the problem or if it's something random.

    I'm using Facebook Android SDK 3.17 for Xamarin

    Greetings from Argentina Hernan www.hernanzaldivar.com

    0 讨论(0)
  • 2021-02-05 00:41

    You have to enable facebook sign in on Firebase Console and add the facebook app id and app secret key and it should work fine

    0 讨论(0)
提交回复
热议问题