By following the facebook sample for login and posting, after I do login and I get name and photo of my profile , when I try to post on wall in the following part..
if (accessToken != null) {
pendingAction = action;
if (hasPublishPermission())
{ handlePendingAction();
} else
{
LoginManager.getInstance().logInWithPublishPermissions(this,Arrays.asList(PERMISSION));
return;
}
}
I get ACCESS_TOKEN_REMOVED permissions: [user_friends,public_profile,basic info]
Why the permissions are removed if I successfully login. How can we fix it?
Here are some general tips to help you debug this:
- try to update to the latest SDK
- try on different devices/emulators
- try uninstalling the app and re-authorize from here
Now for permission specific issues, make sure to always test first with a user who's an Admin/Developer/Tester of an app, since your test will fail with normal user if you app is:
- not public (still in development mode)
- public BUT the permission you are testing against is not yet approved by Facebook
Please be sure to override in your Activity the onActivityResult method:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
}