facebook: permanent Page Access Token?

后端 未结 16 2164
情书的邮戳
情书的邮戳 2020-11-22 02:39

I work on a project that has facebook pages as one of its data sources. It imports some data from it periodically with no GUI involved. Then we use a web app to show the dat

16条回答
  •  梦如初夏
    2020-11-22 03:12

    Here's my solution using only Graph API Explorer & Access Token Debugger:

    1. Graph API Explorer:
      • Select your App from the top right dropdown menu
      • Select "Get User Access Token" from dropdown (right of access token field) and select needed permissions
      • Copy user access token
    2. Access Token Debugger:
      • Paste copied token and press "Debug"
      • Press "Extend Access Token" and copy the generated long-lived user access token
    3. Graph API Explorer:
      • Paste copied token into the "Access Token" field
      • Make a GET request with "PAGE_ID?fields=access_token"
      • Find the permanent page access token in the response (node "access_token")
    4. (Optional) Access Token Debugger:
      • Paste the permanent token and press "Debug"
      • "Expires" should be "Never"

    (Tested with API Version 2.9-2.11, 3.0-3.1)

提交回复
热议问题