We've run into a very strange case in which a particular Facebook account fails on a request to 'https://graph.facebook.com/me/friends?access_token=XXX' after successful login. After discovering this case in our app I verified that the exact same exception occurs when using the Facebook SDK sample - SessionLoginSample. After successfully logging into this particular account and granting privileges I return to the sample app and click the test link. This is the response:
{
"error": {
"message": "An unexpected error has occurred. Please retry your request later.",
"type": "OAuthException",
"code": 2
}
}
When I log in using any other Facebook account I get what I would expect - JSON content that lists my facebook friends.
Any ideas on how to investigate this? Haven't had much luck on the FB support site and it's not even clear to me how to post a bug report to them.
Based on comments above, i think your problem is that one of the users is an old 'platform test user' from the old test user system - this may not work anymore.
The current test user framework is documented here: https://developers.facebook.com/docs/test_users/ - these may be a good workaround if you can't use your real account for testing
来源:https://stackoverflow.com/questions/13459594/oauthexception-code-2-for-particular-account-when-using-sessionloginsample