I'm trying to search Facebook for relevant groups depending on keywords. I'm using to graph explorer and it works fine.
search?&type=group&q=php&access_token=MY_TOKEN
Is there anyway I can perform this search from my server using a (my) user access token and keep renewing the access token through the PHP SDK?
From looking at the documentation it looks like I have to use a user access token that requires a login and expires after a set amount of time?
As the facebook docs here say . you will have to extend the token when it expires . i guess its a security measure from facebook to ensure that the user is still active with the app .
Even the long-lived access token will eventually expire. At any point, you can generate a new long-lived token by sending the person back to the login flow used by your web app - note that the person will not actually need to login again, they have already authorized your app, so they will immediately redirect back to your app from the login flow with a refreshed token
A long lived access token is valid for 60 days . All you need is to supply the new access token once in a while to your php script . ( assuming you are just using your token for performing the search )