Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirecting a user from a custom tab on Facebook if on a mobile device

Tags:

facebook

I currently have a custom app on Facebook that works fine on desktop PC's (full version of Facebook). As you would know you can't access custom apps from mobile devices and it redirects you to the wall of the page.

Is there a way to redirect them to a mobile web app if they try to access the app from a mobile device? So that way when people share links to the app I can at least show them something.

I saw the Mobile Web URL option in my app but am unsure on how this will actually work.

like image 251
Adam Avatar asked Nov 18 '25 05:11

Adam


1 Answers

You are referring to the "mobile tab access" Vitrue announced this week? :)

What they are doing is this (basically):

  1. Create a special link to the tab (mydomain.com/tablink1 or something, NOT the ?sk=app_xxxx URL in the browser bar)
  2. On that link they have code which does a conditional redirect
    1. If it's a regular browser/device, redirect to the tab (?sk=app_xxxx)
    2. If it's a mobile browser/device, redirect to an alternate mobile webpage with the same content as the tab (mydomain.com/mobilecontent1)

The redirect is not on the actual tab, since the mobile browsers will never get there. It has to be on a separate page.

So if they try to access the tab on a mobile device with the regular tab URL they will not get redirected. It only works if they go to the special redirect URL. Vitrue's application publishes that special redirect URL to the Page wall.

It works very well to make sure everything you post to your Wall (which mobile users can see) does not break, but it does not really provide a redirect for mobile users trying to get to your tab.

That's the best we can do right now though, until Facebook actually comes up with a mobile tab solution (bug filed here: https://developers.facebook.com/bugs/264010470314544)

Good luck!

like image 64
thaddeusmt Avatar answered Nov 20 '25 01:11

thaddeusmt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!