Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to access facebook app / fan page tab on mobile browser [duplicate]

I have created an app an that can be accessed by the desktop browser by following link like "https://apps.facebook.com/APP_NAME/".

While I am running facebook on android mobile on google chrome browser going through https://m.facebook.com, I am not able to access the same app.

Here my concern is, is it possible to access the facebook app on mobile browser and can we access the facebook fan page custom tab on mobile browser?

In short I want to access my facebook app page on mobile browser, and I am unable to do so.

Thanks In Advance!

like image 646
Chirag Shah Avatar asked Mar 15 '14 07:03

Chirag Shah


1 Answers

When you are browsing on mobile devices through https://m.facebook.com you don't have access to Canvas Apps also known as "App on Facebook" nor Page Tabs.

To solve this you can add a platform to your existing App, imagine this case scenario where you have a app that's a Page Tab and a App on Facebook (Canvas App). We are going to add a new platform, Website, to do this, just go to your existing app, then settings and at the bottom of the page there's a button that says +Add Platform, after that a pop-up will appear:

facebook mobile app

If you notice my app already has two platform the light grey ones, now I'm adding a new one the Website as I said before.

After you choose the website platform, two new fields will appear on your App settings, the next picture is a possible setup for all the platforms of your app:

facebook mobile app step 2

In this example I decided that each platform as his own url, since each platform as different behaviors, for example on page tabs you can check if the user likes your page without asking for permissions, on canvas page you need to ask permissions first to know if the user likes a page and on mobile websites you need to verify if the user is logged in on Facebook and if he already has granted permissions to your app. The thing is after you grant permission on one of this platforms you can access all the three, since they are all the same app.

Imagine that you access your page tab app on your desktop and you grant permissions to it. Now try using your mobile device and login through https://m.facebook.com the app you created will be available on your APPS menu as bookmark and if you use facebook search on your mobile device it will also be available. This next pic is the APPS menu :

facebook mobile app step 3

Note: In this pic you don't see any app, I don't have any installed it's just for clarification

I also do one thing when I'm announcing my App on my Page Tab, since people will see your posts on desktop browsers and mobile browsers I also create a gate that redirects user based on their browsers. I create a post something like this:

Hey, do you want to be cool? Then check this awesome app http://bit.ly/best-app-evah

I use a bit.ly just because it's more beautiful, this bit.ly redirects the user to my url https://myapp.com/app/gate where I have this piece of code:

<?php
// Include and instantiate the class.
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;

// Any mobile device (phones or tablets).
//redirect the page to your Mobile or Responsive Web design website
if ( $detect->isMobile() ) {
header('Location: http://YOUR_MOBILE_WEBSITE/');
}
//redirect to our canvas page or page tab.
else { 
header('Location: http://www.facebook.com/YOUR_FACEBOOK_PAGE_NAME/app/YOUR_APP_ID_NUMBER/');
}
?>

========================================================================= NOTE: The "Mobile_Detect.php" class file required at the beginning of the above php script, you can download it from https://github.com/serbanghita/Mobile-Detect and upload it to your site for this to work. Otherwise, it won't work. =========================================================================

Oh and as Nisarg Patel said check the facebook blog post

like image 147
Fabio Antunes Avatar answered Oct 14 '22 21:10

Fabio Antunes