Get application id from user access token (or verify the source application for a token)

前端 未结 4 1611
南旧
南旧 2020-12-02 05:36

I found this question, which has an answer, but facebook changed the token format since then, now it is something like:

AAACEdEose0cBACgUMGMCRi9qVbqO3u7mdATQ         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-02 06:28

    Why not to use official way of doing things? Here's the request from FB's own video about security.

    Request: https://graph.facebook.com/debug_token?input_token={token-to-check}&access_token={app_id}|{app_secret}

    Response: "data": { "app_id": {token-app-id}, "user_id": {token-user-id}, ... }

    Link to an official video: https://www.facebook.com/FacebookforDevelopers/videos/10152795636318553/

    I made a screenshot so that time is visible, and you can find more info if you are interested.

提交回复
热议问题