I request a instagram api access token and it return and url with the token ,something like that http://localhost/pruebainst/pruebas.php#access_token=MY_TOKEN
.
My question is how I can get this token of the url to store it on a variable to use it?It is not on $_GET OR $_POST.
Asked
Active
Viewed 188 times
1
-
Look here http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript – Praveen M P Aug 26 '16 at 12:02
1 Answers
0
You cannot use php
or other server-side code to get hash fragment in URL. You have to use javascript
var access_token = window.location.hash.split('access_token=')[1];

krisrak
- 12,882
- 3
- 32
- 46