javascript - How does Facebook find out whether it's mobile device or not? -
i've run myself problem while implementing fb pay dialog external site.
for displaying dialog, use fb.ui method according documentation:
https://developers.facebook.com/docs/reference/dialogs/pay/
but url generated js contains display=popup parameter, works on mobile devices only. it's not case: need payments work on both mobiles , desktops.
so, decided use js fb.ui method mobiles , simple url desktops.
here questions:
1) correct decision or there better way make fb pay dialog work on both mobiles , desktops?
2) if it's best way, how can find out whether it's mobile device or not? internally, in our site use list of mobile user agents guessing, it's not fb way. so, what's fb way?
Comments
Post a Comment