GraphMethodException Facebook API
Asked Answered
G

3

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!

Googins answered 6/7, 2015 at 15:31 Comment(1)
this can happen due to various thing wrong. In my case I uninstall Facebook app and working nowMarcin
M
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://mcmap.net/q/471664/-graph-api-returns-39-false-39-or-39-unsupported-get-request-39-accessing-public-facebook-page - 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.

Mendelson answered 6/7, 2015 at 15:37 Comment(0)
G
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);
}
Guib answered 18/9, 2018 at 6:44 Comment(2)
where i add this line in adapter class ?Estelaestele
@Niceumang You need to add this code in your activity from where you are requesting GraphRequestGuib
M
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://mcmap.net/q/471664/-graph-api-returns-39-false-39-or-39-unsupported-get-request-39-accessing-public-facebook-page - 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.

Mendelson answered 6/7, 2015 at 15:37 Comment(0)
D
0

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

enter image description here

Danu answered 21/12, 2018 at 2:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.