facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.96k forks source link

Data Access Expiration #1127

Open predatorscorpion opened 5 years ago

predatorscorpion commented 5 years ago

Hello everyone! I have an access token without expiry, but the expiration period for data access is 90 days. After 90 days I can still access my app, but my app can't access their data. To regain data access, I have to re-authorize my app's permissions. I found this article https://developers.facebook.com/docs/facebook-login/auth-vs-data/ which explains that I need to use auth_type: 'reauthorize'. But in the Facebook SDK for PHP (v5) I didn't find anything like that. Can anybody show me an example how to check if that period has expired and how to re-authorize my app's permissions using Facebook SDK for PHP (v5)? Thanks!!