PHP code cannot see query string param on return in Facebook oAuth flow
Posted
by TMC
on Stack Overflow
See other posts from Stack Overflow
or by TMC
Published on 2010-05-10T09:02:52Z
Indexed on
2010/05/10
9:24 UTC
Read the original article
Hit count: 253
php5
|facebook-api
I am doing some integration with Facebook Open Graph using their oAuth flow and having issues with parsing query string parameters they return.
On my callback URL, they pass back an "access_token" parameter with a hash (#). so the callback would be:
http://mydomain.com/callback.php#access_token=foobar123
where foobar123 is my access token I'm trying to parse out.
However, no matter what I do, my PHP code cannot see if and I've done every debug trick I know (even using phpinfo() to go through everything). The URL is stated only as http://mydomain.com/callback.php. It's as if the rest of the URL isn't really there!
This code returns nothing:
$token = $_REQUEST['access_token'];
Any help would be greatly appreciated... I'm obviously missing something simple.
© Stack Overflow or respective owner