I know this is probably extremely simple, but I can't seem to figure it out or find the answer I'm looking for. I'm using Instagram's API to allow user's to login and see their feed. This is done on the client side with Javascript. After authorizing my app, the browser sends back an access token in the url like so: www.example.com/#access_token=12345679
.
What's the simpest vanilla JS to get the raw number of the access token? I've tried location.hash
but that returns both the key and value like so: acess_token=123456789
Any help appreciated.
Just split with '=' on the returned key value pair
var token = obj.split('=')[1] ;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments