Reputation: 7266
I am trying to make my online app communicate with Facebook. According to their documentation in order to authenticate my users I need to redirect them to the oAuth dialog, with this URL:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL
So far so good. If the user grants me permission Facebook will redirect him to the URL I specified on my request, appending a code to it. Like this:
http://YOUR_URL?code=A_CODE_GENERATED_BY_SERVER
Question: how do I read that code with my PHP script?
Upvotes: 1
Views: 191
Reputation: 4627
So the response URL should be like http://youdomain.com/controller.php?code=A_CODE_GENERATED_BY_SERVER
in your controller.php
$_REQUEST['code']
Upvotes: 1