Reputation: 2220
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
Upvotes: 3
Views: 3148
Reputation: 1256
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
Upvotes: 1
Reputation: 35900
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.
Upvotes: 3