Difficulty recovering data from a link in Laravel

Asked

Viewed 29 times

0

I am developing an application with the Laravel framework along with the instagram api and I have reached an impasse: in a given routine, I get a redirect that returns the login to my application, but the problem is that in this redirection comes an important data to be used in the application but it comes in this format that I cannot use: "http://localhost:8000/insta#access_token=dado_que_eu_preciso".

I tried to use Laravel’s own route mechanism to try to get this data but I was not successful. Someone would help me?

  • Specify your problem better, post parts of your code, where are you hitting that url? Does it all come from the api? insta#access_token=dado_que_eu_preciso

  • The url is from the api. After allowing my site access to the instagram data, the site itself makes this redirect with access_token

1 answer

0


I was able to solve the problem using Javascript, taking the data from the hash using "Location.hash" and then removing "#access_token=" using replace to finally isolate the final value I wanted to rescue from the url.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.