Reputation: 52
I'm new to Facebook Development using PHP. I have created a nice script which gathers the facebook news feed from my fan page to a JSON array using the graph api.... eg//
$url="https://graph.facebook.com/".$fbID."/feed?access_token=".$token."&limit=20";
(ghdn using the curl commands to collect the JSON..)
The problem is the access token expires after 2 hours, how can I make this not expire or renew?
Thanks for any help...
Upvotes: 1
Views: 3057
Reputation: 4466
If your fan page is public and has no restrictions like demographic restriction, then you can use your App Access Token to query and retrieve your fan page's feed.
In case your fan page is having restrictions you may use Page Access Token by giving your app manage_pages
permission and retrieving Page Access Token using following Graph request
/{user-id}/accounts
Upvotes: 1