How to handle social networks token expiration?

442 views Asked by At

I'm writing a mini script (web page) similar to buffer.com or sproutsocial.com to schedule posts to social networks such as facebook. The issue is that these services require the use of tokens that have expiration dates (for facebook the max is 2 months I believe). If my users schedule the posts say 3 months later, then the tokens will expire before the posts can be published.

I can automatically renew these tokens if and only if the users visit the web page within the expiration period. I see this post here Posting to Facebook on behalf of the user: how to handle token expiration? and I wonder if this is the only solution?

I have never been asked by Buffer and Sprout to do anything even if I dont' visit their sites after a long time so I wonder if there is a way for them to keep these tokens fresh?

1

There are 1 answers

2
andyrandy On

There is no way to auto-refresh tokens for the Facebook API, you can only do that with user interaction. You are talking about an extended user token though, which is valid for 2 months. Extended page tokens are valid forever.

More information: