Forum Academy Marketplace Showcase Pricing Features

Get URL data DOES NOT WORK with '#' if present before the parameter

I am trying to get my access token from Reddit – so far so good.

On the redirect URI, when the access_token comes back, a # is present before access token.

It looks like: #access_token=asdasdasf23q3wlknq2kh3&etc…

If I try to capture this parameter, either by just text or by including the hashtag, it results in NOTHING.

However, if I add an & inplace of the #, the thing works!

AgghHhhHhh!!

I don’t know if you are familiar with URL structure or not, but for anybody who is not, these links may help understanding them more…once I understood URL structure I was able to make much more use of it in my apps and I do it constantly.

1 Like

You can always store the URL as record in your DB and then use REGEX to isolate what you need.

I found an easier way, you can use split by # and then pick the item number. On the topic above it would be split by # and item#2:find and replace: #token= by —> Leave Empty

3 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.