Reputation: 428
I'm writing a cron script which, periodically posts to facebook.
How would I go about renewing the access token each time the script runs?
Upvotes: 0
Views: 381
Reputation: 74014
If you need a User Token, you can only refresh it manually with the user. But you can extend it to an Extended User Token that is valid for 60 days.
If you need a Page Token, just extend it and it will be valid forever (that is, until you change your password).
Information how to generate the different tokens can be found in those articles:
Btw, autoposting to user profiles is not allowed, so i assume an Extended Page Token is what you want.
Upvotes: 2