Tin Rabzelj
Tin Rabzelj

Reputation: 132

Facebook Graph API GraphMethodException 100

I am calling the following Graph API with access tokens issued by two different apps:

/v2.3/{user_id}?access_token={access_token}

First call works, second returns 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
  }
}

Apps have the same settings in the Facebook dashboard. I can't find what's causing this.

Upvotes: 0

Views: 223

Answers (1)

phwd
phwd

Reputation: 19995

If you are using the same ID for both and it's not a Global then one of the calls will always be guaranteed to fail.

Graph API 2.0+ uses app scoped IDs, that is, the ID you obtain in the application is unique and cannot be used outside of that calling application.

So

  • /v2.3/{user_id_from_app_1}?access_token={access_token_app_1} Always work

  • /v2.3/{user_id_from_app_1}?access_token={access_token_app_2} Always fail

  • /v2.3/{user_id_from_app_2}?access_token={access_token_app_2} Always work

Upvotes: 1

Related Questions