I am working on facebook page wallpost automation using python
I have automated posting on a fb page that i own by using facebook graph api post So i do this by sending a HTTP POST request to https://graph.facebook.com/mypagename/feed
with access_token and message as POST paramaters
I generate the access token by using graph api explorer by selecting my app that i am using and giving it permission to manage my pages
Intitially the access_token use to expire in 2 hours
To extend the expiry date to 2 months i send HTTP GET request to this url
the response is a json string with new access_token and expiry time in seconds
the expiry time of new access token is now 60 days.
Now is it possible to extend expiry time beyond 60 days??
You can use following api from facebook to refresh token life to 60 days and just when the token is about to expire, call the same api again with-in 60 days to refresh its life back to 60 days from that point of time Token expire is present in expires parameter and its value is in seconds
Replace CLIENT_ID and CLIENT_SECRET with their actual value
in ACCESS_TOKEN, put the actual token value without appending "access_token="