Page 1 of 1
Facebook links on mobile/tablet take you to desktop version
Posted: Tue Nov 03, 2015 9:57 am
by ccarew87
When I click on my aplication link on a mobile or tablet (e.g.
http://bit.ly/1GnKExH) it takes you through to the desktop version of the page.
The issue appears to be that WURFL isn't recognising Facebook's In App browser as a mobile device.
The User Agent is subtly different for opening in a browser vs opening In App. Below are examples:
Facebook In App Link – User Agent:
Mozilla/5.0 (Linux; Android 5.1.1; XT1562 Build/LPD23.118-10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/45.0.2454.95 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/51.0.0.14.10;]
Chrome User Agent
Mozilla/5.0 (Linux; Android 5.1.1; XT1562 Build/LPD23.118-10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36
Is there a way for the Facebook App links to be detected as mobile or tablet devices?
Thanks.
Regards
Chris
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Tue Nov 03, 2015 4:22 pm
by Elliotfehr
Chris,
Are you able to let me know which WURFL API and API version along with the date of the wurfl.xml that you are using? Using the latest API (1.6.3) and wurfl.xml both of these devices are returning true for the `is_mobile` virtual capability.
Thank you,
Elliot Fehr
Support Engineer
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Tue Jan 26, 2016 10:35 am
by the_farwall
Hi Elliot,
I'm working with Chris C. above on the same project. We've updated our OnSite API jar to 1.6.3 and have a build process that pulls in the latest wurfl.xml during deploy so that should be no older than a month at any time, and no older than a day or two right now. Within our server code, we decide whether to serve a mobile optimised page by checking the is_wireless_device capability and the is_mobile virtual capability which has been working happily for us except for this particular case when users reach the page from a link within the Facebook mobile app. We're just wondering if you have any other recommendations as, for some reason, for that particular browser, the capabilities always report false so we serve a desktop page.
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Tue Jan 26, 2016 12:27 pm
by aaronp
Hi Chris,
The UA samples provided are returning as true for the `is_mobile` virtual capability on API version 1.6.3. Could you provide us with another example UA which is returning false?
Thanks,
Aaron
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Wed Jan 27, 2016 10:10 am
by the_farwall
Hi Aaron,
Another couple of examples just from people's phones around the office. We're just opening up the official Facebook app, following a link to one of our company's sites and are being served the desktop verion of the site becuase it's not detected as mobile. Again, on the same phones, opening the sites directly in the phone's browser is detected as mobile and served the right page.
Samsung Galaxy from within FB app:
Mozilla/5.0 (Linux; Android 5.0.1; GT-I9505 Build/LRX22C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/47.0.2526.100 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/60.0.0.16.76;]
iPhone 6 from within FB app:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75 [FBAN/FBIOS;FBAV/47.0.0.43.396;FBBV/20481971;FBDV/iPhone7,2;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.2;FBSS/2; FBCR/vodafoneUK;FBID/phone;FBLC/en_GB;FBOP/5]
We'll keep debugging here too but we're using code recently updated to use the 1.6.3 API and the virtual capability.
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Wed Jan 27, 2016 12:25 pm
by aaronp
Hi Chris,
After running our tests on the samples, we are returning true on both UAs for `is_wireless_device`.
Are you able to provide us with the logic you are using to determine the device type?
Thanks,
Aaron
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Fri Feb 12, 2016 9:50 am
by the_farwall
Hi Folks, sorry for the delay, we've been trying to debug the code around the issue to find any other possible causes. So, logic wise we create a Device object by calling getDeviceForRequest on a GeneralWURFLEngine instance with the HttpServletRequest as input. Then when it comes to determining whether to serve desktop or mobile content we first check whether the device id is "generic" and if so show desktop content, otherwise we check the "is_wireless_device" capability and the "is_mobile" virtual capability to decide.
After more testing this week, it seems that if we hit the site via a link from inside the Facebook app, so the brower opens 'within' Facebook, then we're actually hitting the "generic" clause in our code, suggesting the device isn't detecting much at all in that situation. We're setting up more debug at the moment but would appreciate any thoughts.
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Fri Feb 12, 2016 11:40 am
by aaronp
Hi Chris,
After reading the description of your logic, I would suggest you try checking for `is_mobile` (which is an alias for `is_wireless_device`) as opposed to checking for `generic`.
Also, are you able to try this on our latest API release (v 1.7.0.0)?
Let me know how things go.
Thanks,
Aaron
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Sat Mar 05, 2016 5:18 am
by waleeedijaz
Within our server code, we decide whether to serve a mobile optimised page by checking the is_wireless_device capability and the is_mobile virtual capability which has been working happily for us except for this particular case when users reach the page from a link within the Facebook mobile app. We're just wondering if you have any other recommendations as, for some reason, for that particular browser, the capabilities always report false so we serve a desktop page.
Re: Facebook links on mobile/tablet take you to desktop vers
Posted: Sun Mar 06, 2016 4:06 pm
by aaronp
Hi,
Thank you for the notification. Are you able to let me know which version of the API you are currently on?
Aaron