Never Expiring Facebook Page Access Token

后端 未结 1 1483
孤街浪徒
孤街浪徒 2020-12-30 15:39

I have been trying to find a way to create a never expiring FaceBook Page Access Token. I have seen the option where you provide the AppID|AppSecret in place of the token h

1条回答
  •  一生所求
    2020-12-30 15:48

    After piecing together many different solutions - I did this and it seems to work. I assume you only want a token for a single page and that you already have your Facebook app page setup.

    1. Get the ID of the page by navigating to it from a web browser, click on About link in the menu list down the left hand side of the page, then scroll to the bottom of the About information and you will see the Page ID display.

    2. Navigate to Facebook Graph API Explorer

    3. Remove everything after the API Version (in this case v3.2) on this line of the explorer

    and replace it with 123456789?fields=access_token where 123456789 is your page ID.

    1. Click the Submit button to the right hand side of the line you just entered the text into.

      1. You will receive a token back in the response at the bottom of the screen that looks similar to this:

    { "access_token": "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT", "id": "1755746091324056" } where TTTTTTTT is your access token.

    1. Copy the token only (no quotes) out of the response and past it in the Access Token field at the top of the Page replacing the Access Token that was previously there.

    1. After pasting in the new access token click on the blue information icon to the left of the access token.

    2. In the Access Token Information dialog, click on the 'Open in Access Token Tool' button at the bottom right of the dialog.

    1. In the Access Token Debugger that will open up, click on the 'Extend Access Token' button at the bottom of the page. A new access token should be displayed and the text above it should say that it never expires.

    I hope this helps.

    PS - Here is what I see in Facebook's Access Token tool when I paste the token generated using this method into it. It says this token will never expire.

    0 讨论(0)
提交回复
热议问题