What criteria does Facebook use to prevent the send dialog from being displayed on the mobile device?

Regarding web pages and web pages using integration with Javascript and Facebook server ...

The Facebook documentation notes that the send dialog is not supported on mobile devices, but they do not indicate how they make the determination that the dialogue will not be shown or how we can find out.

This makes it difficult to display some alternative functions in the right cases. For example, iphone is missing, but the ipad will display the iframe version. Nexus 7 with Chrome will not make a pop-up window, but it does not have a "mobile" in the user agent.

Does anyone know the criteria? i.e. Regex on user agent or some specific function detection?

Right now I'm using browser sniffing: - (

function isMobile(string) { return /mobile|android/i.test(string || navigator.userAgent); } 

Which, for example, does not take into account the fact that iPad Safari displays this dialog box as an iFrame (but not a pop-up window).

Thanks.

+4
source share

All Articles