AccessToken token:ACCESS_TOKEN_REMOVED in Facebook Android SDK

五迷三道 提交于 2019-12-03 05:15:45

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());

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);
}

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

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...

Vackup

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!