FB.ui dialog not displayed on mobile devices
I am using FB.ui to trigger a requests dialog. The dialog loads properly on non-mobile devices. However, it fails to load on mobile devices like iPad. What appears is something like a popup/iframe with a loading-gif
.
FB.ui({
开发者_开发知识库 method: 'apprequests',
message: 'Hello People',
title: 'A friendly hello',
data: 'some-data',
display: 'touch',
access_token: my_access_token,
}, callback);
I have tried with display: 'iframe'
, display:'popup'
, display: 'wap'
and display: 'page'
. But nothing works. How can I get it working on mobile devices? Thank you.
I used a URL redirect for my mobile devices like here: http://developers.facebook.com/docs/guides/mobile/#web
To display a mobile-friendly Feed Dialog, redirect the user to the following URL:
http://www.facebook.com/dialog/feed? client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&display=touch
I assume it works similarly for the apprequests method you are using.
My original response was deleted because the mod thought I was creating a new question. I was in fact responding to
I have tried this solution on iPad and still couldn't get it working with apprequests. I will try one more time when I have time and mention the result here. Thanks for the response. > – dheerosaur Jul 18 at 10:52
I have found the solution for people still having issues specifically with iPad, namely @dheerosaur and documented it here:
http://deansofer.com/posts/view/9/Facebook-UI-Modals-on-iPads-are-Borked
The trick is to supply this piece of CSS:
#fb_dialog_ipad_overlay {
width: 600px !important;
}
I also submitted a bug ticket to FB to look into it.
精彩评论