Permanent Facebook page access token
One of my websites has integration with Facebook. By integration, I mean that each single post submitted to the database is automatically published to the Facebook page. In order to publish anything on FB page using API, you need to have a valid access token. Facebook documentation is pretty straightforward on that topic and you should not have any troubles with obtaining the token. Problem is that those tokens are valid for 3 months which for me is not enough. Let's find out how we can generate a permanent and non-expiring token.
First of all, we need a Facebook account and app. Once you have them go to Api Explorer and choose your app from upper right corner select box. Next click
Get Token and
Get User Access Token and check
Now you need to visit following URL:
If everything went fine you should get a response with the access token. Copy this access token, paste it to Graph Explorer and access
/me/accounts resource. Now you can copy access token from your page entity.
Finally, you can check your final access token in the Access Token Debug tool. It should be a permanent token without an expiry date.