Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an API equivalent of the Facebook Access Token linter/debugger?

Is there a graph API equivalent of the Facebook Access Token linter/debugger that I can call programmatically?

The linter is nice. It tells you all sorts of cool information about the token you have, such as the permissions granted (available to me via me/permissions), the issue and expiration dates, the App ID, App name, profile Id, User Id, User Name, if it is valid (available to me if I try to call /me and watch for the exception returned), and the origin.

App ID:      APP ID : APP NAME
Profile ID:  PAGE NAME
User ID:     ID : NAME
Issued:      1328916821 : 3:33 pm Feb 10 2012
Expires:     1334100821 : 4:33 pm Apr 10 2012
Valid:       True
Origin:      Web

So how about it? Is there a programmatic way to get this info without having to resort to screenscraping the linter tool?

like image 903
DMCS Avatar asked Feb 10 '12 23:02

DMCS


People also ask

What is access token in Facebook API?

An access token is an opaque string that identifies a user, app, or Page and can be used by the app to make graph API calls. When someone connects with an app using Facebook Login and approves the request for permissions, the app obtains an access token that provides temporary, secure access to Facebook APIs.


2 Answers

This is now possible with the debug_token endpoint

https://developers.facebook.com/docs/authentication/access-token-debug/

like image 125
Michael Mior Avatar answered Oct 06 '22 00:10

Michael Mior


It's possible. Now you can check what information is associated with the access token you have. Simply Fire this URL:

https://graph.facebook.com/debug_token?input_token={input-token}&access_token={access-token}
input_token: the access token you want to get information about
access_token: your app access token or a valid user access token from a developer of the app

Source https://developers.facebook.com/docs/facebook-login/access-tokens/

like image 30
Muhammad Saqib Avatar answered Oct 06 '22 02:10

Muhammad Saqib