No facebook request_ids when click invitation first time

105 Views Asked by At

I found exactly the same problem with the post below but there is no answer in the post.

https://stackoverflow.com/questions/11865712/request-ids-are-gone-after-doing-authentication-via-oauth

I wonder if you guys have explanation of what I found? My assumption is that the $request_ids cannot be access unless you are authorized the app so possibly this is by design.

1

There are 1 best solutions below

0
On

I found the answer myself. In my code, when I try to getLoginURL, I specified a redirect_uri. The first time user login to my page/app, it will redirect to this URL so all parameters are lost.

It should not be an issue in normal scenario as well as it's OK to specified the redirect_uri with your app URL such as www.facebook.com/FanPages/app_XXXXXX otherwise you may have a problem that facebook redirect page to your canvas URL instead of showing the facebook page tab with your canvas inside.

For my scenario, I'd like to track if this user is using the page tab by coming from the invitation of other user or not. So that I will need to have request id in my landing page. The redirect_uri stop me to do it. Finally, I removed the redirect_uri so that all parameters are gone and I put some code on my landing page to redirect it back to www.facebook.com/FanPages/app_XXXXXX after I have done all I wants with request id.

Not sure it's a good one but I can't figure out a better solution.

Hope this help for anyone who got similar issue.