Android facebook getPermission is not working well

301 Views Asked by At

Here's how I request facebook publish_actions permission.

if ( !AccessToken.getCurrentAccessToken().getPermissions().contains("publish_actions")) {
 callbackManager = CallbackManager.Factory.create();
 LoginManager.getInstance().registerCallback(callbackManager, facebookCallback);
 LoginManager.getInstance().logInWithPublishPermissions(ShareActivity.this, Arrays.asList("publish_actions"));
}

Then, I am granted the publish_actions permission.

However, here's my problem:

I go to facebook app, remove this permission and then go back to my app. I do

AccessToken.getCurrentAccessToken().getPermissions()

The return permission lists still contains publish_actions. Seems like it's not updated yet. Is there a way i could handle this problem? Thanks.

0

There are 0 best solutions below