1

I am using a facebook api to generate an access key. To obtain you need to input a redirect url.

The output adds a get to the redirect url but i am getting this:

http://example.com/index.php?#access_token=228384748&expires_in=5386

In my index.php:

echo $_GET['access_token']; //Doesnt work
echo $_GET['#access_token']; //Doesnt work

How can i obtain this value? Thanks!

William
  • 1,009
  • 15
  • 41
  • 1
    why is there a # in your URL? – Syed mohamed aladeen Apr 07 '17 at 12:36
  • Possible duplicate of [Get fragment (value after hash '#') from a URL in php](http://stackoverflow.com/questions/2317508/get-fragment-value-after-hash-from-a-url-in-php) – Syed mohamed aladeen Apr 07 '17 at 12:37
  • Possible duplicate of [Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)?](http://stackoverflow.com/questions/940905/can-i-read-the-hash-portion-of-the-url-on-my-server-side-application-php-ruby) – Nirnae Apr 07 '17 at 12:38

1 Answers1

1

hashtag in the link will try to find a page division (usually marked by the div tag in html) and the redirect will not pass any queries after it in the link

Giles S
  • 26
  • 3
  • Since you are correct with the hashtag and this is no longer an issue for me AND you are the only one with an answer. I accepted ;) Thanks! – William Apr 26 '17 at 14:52