We have a highscore database setup for our application. We ask the user to login into facebook before their scores are added to the data base, and we use their facebook id to identify their entry in the table. For some reason a bug has occurred and duplicated their highscore. We are unable to figure out what is causing this bug (we can't reproduce it at) but what we do know is that at some point in the process, the last two digits of user's app specific facebook user is set to 0, making it different to their earlyer entry.
My question isn't about the bug (I needed to give the problem context). Our way around this until we can figure out the cause, is it to have a cron job look for any duplicate name and email address, then look at each facebook id in the entries and determine which of the two is valid and which is not.
As of now after looking up the documentation, I can generate an app access token with the following api call : https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens. However the php object that allows me to make a request to facebook requires an access token (via a session) https://developers.facebook.com/docs/php/FacebookRequest/4.0.0. The documentation I've found making an api request to get an app access token are all out of date, as the version of the sdk they were using was depreciated.
So, as it understand it, I need an access token to generate an access token. There must be a way to get an app access token
(If i have any misunderstanding of the documentation, please post it as a comment so I can improve the question)