I am trying to retrieve the token_for_business from the GraphUser that I have already gotten from a ME request. It is coming back null each time. I'm able to successfully retrieve many other bits of information from the ME request. For example:
public String getEmail() {
if (Session.getActiveSession().getPermissions().contains("email")) {
return (String) mUser.getProperty("email");
} else {
return "";
}
}
I've verified several times that the Facebook Dashboard is set up to use the Token for Business. I'm aware that I could try to query the Business Manager API directly, however I'm already chaining several API calls and would prefer to use the data that I am supposed to already have.
public String getTokenForBusiness() {
return (String) mUser.getProperty("token_for_business");
}
The documentation says that this property exists given that the user is logged into the app. Of course, the ME request is made only after the Session state has been recognized to be open, so to my understanding, the user is logged in.
Is there a permission that I'm missing? Are there any other stipulations to using this property?
0 comments:
Post a Comment