Facebook app - Mobile and Canvas? - facebook

can an app in Facebook have desktop page for Facebook Canvas and a page for Facebook mobile at the same time? Current I have a desktop app but if I create mobile pages on the same URL can I point the "Mobile Web" section of Facebook apps to that too?
Thanks

can an app in Facebook have desktop page for Facebook Canvas and a
page for Facebook mobile at the same time?
Yes, sort of. There is no mobile canvas, if that's what you mean. However, you can have a mobile web page and a desktop canvas app for the same app.
Current I have a desktop app but if I create mobile pages on the same
URL can I point the "Mobile Web" section of Facebook apps to that too?
Yes you can use the same URL for both, then just detect the user agent to determine which to show.

User agent sniffing is always a bad idea. In the entry point of your application you should determine if it's desktop or mobile by checking for the 'signed request' variable that Facebook sends if the user is loading the app via a page tab within Facebook (i.e. a desktop user). If the user is accessing the app on mobile, outside of Facebook, then this variable won't be sent.
php:
if(isset($_REQUEST['signed_request']))
//load desktop version
else
//load mobile version

Related

FB mobile canvas app/game redirection to external website

I have a Facebook app built with canvas. We have made the app playable thru the Gamesroom via browser. I am aware that FB has deprecated support for Canvas applications on the mobile FB native app. I would like for when people click my app via mobile FB native app (android for now) to be redirected to a certain domain (web browser version of the game). Is it possible to do this, if so how can we?

Facebook Activity Page on Mobile web page

I'm creating a mobile app using web.
Is there any way to display Facebook Activity page, or share dialog on your Mobile app page? I mean Facebook Activity page displays and stays on the mobile app not outside, or in the browser but on the app I created.
Is there any way to do this?

Facebook app development on mobile devices

I've created a company page on Facebook to which I've added some iframe apps that we've developed. These work great on PC and I can see the tabs to these apps under the cover image. All well and good.
In the development area I've entered a Mobile Site URL under the Mobile Web section, but when I view the Facebook page on a mobile phone, there is no sign of a link (like the tabs on the desktop version). Should there be some kind of link on the mobile version or am I missing something?
Thanks.
To answer my own question.
Seems this is not possible.
Is it possible to show a Facebook app as a Page Tab on mobile devices?

How does Facebook handle tablets?

I'm developing a Facebook app that has a responsive layout. Sometimes my app has to generate a link for the user. Whenever possible, the links will send the user to a Page Tab (when the user is on a desktop) and other times it will link directly to the app (when the user is on a mobile phone).
What is the default behavior for Facebook on tablets? Does it show the mobile site or the desktop site?
Should I use the mobile or desktop version of my app on tablets?
Update: In response to BBog's question in the comments:
My app prefers the desktop version because it includes a Like-gate. If the user experience is good for a tablet to view the app in a page tab (which is only available on www.facebook.com ie non-mobile), then that is preferred because the like button will be displayed at the top of the page, above the app's iframe. In contrast, the mobile version of the app requires that the user click a link that takes them to the (mobile) facebook page which they must like to un-gate the app. It adds an extra step for the user and requires that they navigate away from the app for a moment. Users might be discouraged by this extra step and decide not to enter the gate.
For Android tablets - Honestly, it depends on how you want Facebook to handle it. If you look at the android native app linking wiki - https://developers.facebook.com/docs/mobile/android/deep_linking/, Facebook provides you the option to choose the user experience. The facebook native android app itself treats tablets like mobile phones. It would be ideal if your app is compatible with tablets, and then you can enable deep-linking which will let the user view the content inside of your app.
For iOS, it's handled from within the iOS bundle id.
Unable to find a concrete answer, I ended up detected the user's referral on the first page access. Then if www.facebook.com is in the url, I go to desktop. Otherwise I go to mobile..
if ($detect->isTablet()) {
session_start();
if (!isset($_SESSION["tabletAsMobile"]))
$_SESSION["tabletAsMobile"] = (stripos($_SERVER["HTTP_REFERER"], 'www.facebook.com')===true):'0':'1';
}
$useMobileLinks = ($detect->isMobile() || ($detect->isTablet() && $_SESSION["tabletAsMobile"]));
}

Is there a work around solution for displaying Facebook App tabs on mobile device?

At the moment when you send a Facebook tab URL link to a mobile device you get the following response 'The page you requested was not found' - does anyone know of a workout solution - maybe utilising a fb mobile app that would allow the display of page tab on mobile devices?
I recommend you to provide App Canvas URL to show mobile version of the app to the users who use mobile devices instead of the Page Tab URL. Note that if an user access to the App Canvas URL in a mobile device, the user will see the content of the 'Mobile Web URL' in the facebook app setting, while an user access to the App Canvas URL in a desktop browser, the user will se the content of the "App Canvas URL."
When an user access to the App Canvas URL in a desktop browser, just redirect to the page tab url
When an user access to the App Canvas URL in a mobile device, Facebook will redirect the user to the Mobile Web URL, just serve mobile version of the app in Mobile Web URL.
try this (from here: Is it possible to show a Facebook app as a Page Tab on mobile devices?)
https://www.facebook.com/fbpageurlname?sk=app_123403406338325&ref=ts
adding &ref=ts to the end of the url stops the page tab redirecting to the mobile version of the site.
also, remember to use /fbpageurlname?sk=app_APPID and not /fbpageurlname/app_APPID
otherwise you'll get a page not found error when you add the &ref=ts to the end of the url