Reputation: 21
i used debug_token as in the documentation
'https://graph.facebook.com/oauth/debug_token?input_token='.$token_to_be_checked.'&access_token='.$app_access_token;
but it returned
{"error":{"message":"Missing redirect_uri parameter.","type":"OAuthException","code":191}}
although the redirect_uri is not mentioned in the documentation I added it to the previous request
.'&redirect_uri='.$my_url.'&client_id='.$app_id;
but still getting the following error
{"error":{"message":"Unknown OAuth 2.0 method, debug_token.","type":"OAuthException","code":1}}
would any body help me fix this issue and debug my token correctly
thanks in advance
Upvotes: 2
Views: 2007
Reputation: 191
You are using the wrong endpoint.
You need to:
GET https://graph.facebook.com/debug_token
And you will only need these query parameters:
input_token: The token you wish to debug
access_token: Concatenation of your app's APP ID and APP SECRET with a pipe ('|'). So, if your app ID is '12345678', and your APP SECRET is 'jkg3ekjh453', your access_token would be: '12345678|jkg3ekjh453'
Hopefully this helps.
Upvotes: 10