0

In using the Facebook share dialog you can choose between a popup and a full page share screen. If I choose popup it will still do a full page share screen if user is on a mobile. So is there a way through the SDK I can figure out whether the user is on mobile and the full page share screen will be used?

This is my Javascript for sharing:

FB.ui({
    method: 'share',
    href: 'https://myserver.com/',
},
function(response) {
    if (response && !response.error_message) {
        // handle success
    } else {
        // handle error
    }
});

This question only provides generic and ambiguous answers at best. I need a solution that is specific for the Facebook Javascript SDK - to match its behaviour 100%.

TheStoryCoder
  • 3,403
  • 6
  • 34
  • 64
  • This is not a duplicate of https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - the solutions there are generic and ambiguous at best. I need a solution that is specific for the Facebook Javascript SDK - to match how it behaves 100%. – TheStoryCoder May 22 '19 at 20:32
  • There is no SDK method to get that info. _“If I choose popup it will still do a full page share screen if user is on a mobile. So is there a way through the SDK I can figure out whether the user is on mobile and the full page share screen will be used?”_ - so it uses the full page version on mobile, but you want it to use the full page version on mobile? Huh? – 04FS May 23 '19 at 07:04
  • as 04FS, it´s not related to any sdk, it´s basic javascript. don´t think too complicated, you just want to detect mobile browser. – andyrandy May 23 '19 at 07:50
  • @04FS No, I want to know when the SDK uses the full page version vs the popup - so that I can differentiate the redirect URL. (this is not related to responsive design) – TheStoryCoder May 24 '19 at 08:19
  • The SDK does not provide any method to determine that. – 04FS May 24 '19 at 08:33

0 Answers0