7

So I'm using the following endpoint from facebook graph-api to get a specific post data:

https://graph.facebook.com/v2.2/{post-id}?access_token=XXX

However, it gives me the following error:

{
    error: {
        message: "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
        type: "GraphMethodException",
        code: 100
    }
}

Why is that? I'm doing the samething based on their documentation!

3 Answers3

3

I forgot to add the below code in my Activity and after adding this worked for me.

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    callbackManager.onActivityResult(requestCode, resultCode, data);
    super.onActivityResult(requestCode, resultCode, data);
}
Ketan Ramani
  • 4,874
  • 37
  • 42
2

You can view an answer on this page -> Unusual behavior of facebook grap API ("type": "GraphMethodException", "code": 100)

This isn't a bug, the error means that the data you're trying to access is not accessible to you, does not exist, has been deleted, is not available because you haven't provided an access token from a user who can see it, etc.

See this answer for an example of this error message in relation to Facebook pages: https://stackoverflow.com/a/6847088/21062 - the same is true when trying to access user profiles if that user has blocked you, blocked your app, disabled their account or disabled all apps from accessing their information.

Community
  • 1
  • 1
UtopiaIsGood
  • 169
  • 3
  • 15
0

I can solve this error changing the facebook setting, changed the name of the class by com.facebook.facebookactivity

enter image description here

iagowp
  • 2,428
  • 1
  • 21
  • 32