Is there an API equivalent of the Facebook Access

2020-02-25 23:07发布

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?

4条回答
放荡不羁爱自由
2楼-- · 2020-02-25 23:15
别忘想泡老子
3楼-- · 2020-02-25 23:19

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!

查看更多
唯我独甜
4楼-- · 2020-02-25 23:31

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

查看更多
Melony?
5楼-- · 2020-02-25 23:40

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/

查看更多
登录 后发表回答