When my app posts an image on the wall on Facebook, there is also a link posted that leads to the facebook app.
If the post is seen on a desktop, I want the link to redirect them to the flash based facebook app.
If the post is seen on IOS, I want them instead to see the download link of the same app on the App Store.
Is that possible? Any suggestions?
Trying to change the Facebook link that would either redirect to one page or the other isn't a good practice (and that even wouldn't be possible). Just let the user click on the same link wherever he is using Facebook.
So, once the user on your web page, just catch the user agent which will give you information about his browser and device or computer. Depending on this, you'll know whether he is on a desktop or mobile phone. You'll then be able to redirect the user with the appropriate URL redirection. I let you search on this side with some help:
How do I determine whether it's a mobile device with PHP?
Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the user-agent string combined with specific HTTP headers to detect the mobile environment.
For example: what is your User Agent?
Detect Mobile Browsers | Open source mobile phone detection
"know if mobile browser" on Google
Related
Excuse me for the confusing title. We have programmed App which runs with in the Facebook. It can be accessed over the desktop/notebook browsers. However it is not accessible/available if I login to the Facebook app on my iPhone and go to the APP list. Following scenarios does not work.
1) If somebody sends me the invitation to use the APP using Facebook message. If I now login to the Facebook-app on my iPhone and go to the messages and click on the invitation, I see the error. "Page not found". This works perfectly if I login to Facebook using browser (on laptop or iPhone)
2) On my iPhone, in the Facebook APP, if go to list of my APPs then our APP is not available in that list. (Other apps like candy crush and so on can be found)
Are we missing some configuration?
Thanks in advance.
Best Regards
You are talking about a canvas app?
Those are not available on mobile, and never have been. But you can specify a Mobile Site URL in your canvas settings – users on mobile devices, that follow a link to your canvas app somewhere will then automatically be redirected to that external address.
Little cave-at: This has been disabled on a larger scale by Facebook recently, because some people where using it to redirect users to malware sites. Therefor now you have to get your app “white-listed” before this will work. Check this bug report, the FB engineer mentions are form where you can request this: https://developers.facebook.com/bugs/1051463851558493/
I am wondering if it's possible to track referrals when my website is opened from mobile app? Is there any related information provided in request headers?
Particularly interested to know if it's opened from Facebook mobile app or Instagram mobile app.
Look for the utm_source and utm_medium request parameters on your website. If they don't exist, then the best you're going to get is the user-agent of the device. Alternatively, if you're keen to always use bit.ly type shortened links, you could use a different one everywhere you post the link.
we have created a Facebook app, but when opening this on a mobile (via Web or iPhone) the page results in a 4oh4 error. I have setup a Mobile Web URL but still (after 1 hour wait) gives a 404.
Do I need to make specific changes on my app?
Please help.
This is expected as #Igy stated. You will need to have a handler to support redirecting mobile users to your apps.facebook.com/ or you can redirect them out of Facebook to your own URL if you are going to try and link to your page directly with an app embedded as a tab.
i.e. point link to http://yoursite.com/redirector
is mobile goes to http://yoursite.com/myapp or http://apps.facebook.com/
non mobile goes to http://facebook.com//app_
Some things to note:
You won't get any page specific data back from facebook on your page (i.e. Liked or Not Liked).
Based on #1 you won't be able to restrict the non-liking app users from a page.
After trying everything under the sun to get Facebook to redirect to a mobile web URL, here is what I needed to do in order to get the redirection working:
Make sure the Facebook application is a canvas application. This gives you the ability to give the application a namespace.
Give your application a namespace so that you can access it through https://apps.facebook.com/NAMESPACE. From here, Facebook will do the detection for you, and if needed, redirect your users to your specified mobile URL.
Make sure your app is NOT in sandbox mode.
If your app is in Sandbox Mode, Facebook won't redirect you to the mobile version you have specified in your app settings.
Facebook does the redirecting for you, you don't have to. Although their version of what "mobile" is and what you deem "mobile" might be different.
Is there any different in getting Request for Permission from Facebook Users between desktop browsers users and mobile browsers users?
for example:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream
When I check facebook developer documentation, I can't find info typically for getting permission from mobile browsers users.
I want to know whether I can still use my current OAuth authentication for mobile sites, to get tokens from mobile browsers users?
Any information that I am missing?
Thanks ahead.
Your current will work but there are dialogs which are more suitable for a mobile device, see below.
show a dialog to a user on a mobile device, change the subdomain of the dialog URL from www to m. Facebook will default to an appropriate view based on the user agent. To override that choice, you can explicitly specify one of two mobile display modes:
touch: Used on smartphone mobile devices, like iPhone and Android. Use this for tablets with small screens (i.e., under 7 inches) as well.
wap: Display plain HTML (without JavaScript) on a small screen, such as a Nokia 7500.
From: https://developers.facebook.com/docs/reference/dialogs/
Overview
FB.ui is a generic helper method for triggering Dialogs that access the Facebook Dialog API endpoint.
These include:
Publishing a story to the feed
Prompting the user to add a friend
**Prompting the user to authorize your application, or grant it permissions**
Prompting a payment
Prompting the user to send an application request to a friend
Prompting the user to share a link
https://developers.facebook.com/docs/reference/dialogs/
(sorry for the sloppy answer, in a hurry)
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.
You are referring to the "mobile tab access" Vitrue announced this week? :)
What they are doing is this (basically):
Create a special link to the tab (mydomain.com/tablink1 or something, NOT the ?sk=app_xxxx URL in the browser bar)
On that link they have code which does a conditional redirect
If it's a regular browser/device, redirect to the tab (?sk=app_xxxx)
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!