Is there an API equivalent of the Facebook Access

2020-02-25 23:33发布

问题:

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?

回答1:

This is now possible with the debug_token endpoint

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



回答2:

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/



回答3:

No, it doesn't exist I'm afraid. What were you wanting it for ooi??



回答4:

Unfortunately, no.

You can get a JSON response from the URL debugger by adding &format=json to the URL, but this doesn't work currently for the access_token debugger.

Could file a bug for it!