I’m trying to get the access token of my app using graph api, by requesting the following string:
This redirects to: canvas_page/#access_token=xxx&expires_in=4124&code=A…
But i am not sure how i can parse this with PHP, so that i eventually can make a json request to get the friendlist.
I hope you may be able to guide me 🙂
Thank you
Are you using the Facebook PHP sdk?
https://github.com/facebook/php-sdk
You can use it like this:
You can use the $loginUrl to make a link where the user needs to click that will authorize your application if they haven’t done so already
Then you can make calls to the graph api like this: