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.
Related
I am trying to send a message to a user through private inbox with Phonegap and the phonegap facebook plugin through this functionality:
https://developers.facebook.com/docs/sharing/reference/send-dialog
So when doing this :
FB.ui({
app_id:'XXXXXXXXX',
method: 'send',
name: "This is the name",
link: 'www.google.com',
to:to,
description:'This is the description'
});
as stated in this link : Send private messages to friends
Nothing happen. Why ?
Is it supported by the plugin ?
Please help.
Thanks
I am trying to implement the private message function in phonegap build, but it seems like its only working on desktop not in mobile device.
when I change the method from send to feed, and indicate display to touch.
It works on my IOS build, the window just popup
FB.ui({
app_id:'XXXXXXXXX',
method: 'feed',
link: 'www.google.com',
to:to,
display: touch
});
However, its not working any more when I change the method back to send.
I believe facebook api don't support FB.UI send method in mobile devices, just like what they already mentioned on their page: https://developers.facebook.com/docs/sharing/reference/send-dialog
"This dialog can be used with the JavaScript SDK and by performing a full redirect to a URL. It is not supported on mobile devices."
I STILL DON'T KNOW HOW TO SEND PRIVATE MESSAGE THROUGH FACEBOOK NOW, GOOD LUCK
The send dialog is a useful piece of functionality.
Sadly it is not available on mobile devices
I call the api in the following way;
app.sendMessage = function(){
FB.ui({
app_id: app.facebook_app_id,
method: "send",
link: "http://google.com"
});
};
Right now the outcome on a mobile device is a nasty error page.
Is there a way to detect in javascript whether or not the send dialog is available?
I'd suggest something like;
function sendDialogAvailable(){
return FB.supports("senddialog");
}
I could then change my app's functionality according to this property, but right now I fear I'll have to resort to browser sniffing.
I have a strange issue with the dialog.
Here is a simple code, that I'm using in my project:
FB.ui({
app_id: 'MY_APP_ID',
method: 'send',
name: 'Test',
link: 'MY_APP_LINK',
display: 'iframe'
}, function(response) {
console.log(response);
});
And after dialog opened, I got a common error, which nothing describes:
Here it is in original language:
"Обнаружена ошибка в APP_NAME. Пожалуйста, попробуйте ещё раз позже."
And I think in english it should sound like:
"An error occurred in APP_NAME. Please, try again later."
Could anybody help me, and explain why it is happens, please? I've read documentation at least three times, and didn't found anything useful.
Verify your domain settings for your app – calling dialogs from a page not allowed for the app is a common cause for this kind of error.
You have to give it a valid link - try setting my link to "http://www.google.com".
What kind of device are you using?
In case you are doing this on a tablet/phone, the "send" dialogue doesn't currently support those devices and will result in an error.
http://developers.facebook.com/docs/reference/dialogs/send/
From their doc:
You should specify a URL, and you can pre-populate a user in the ‘to’
field. The Send Dialog does not require any extended permissions. This
Dialog is currently not supported on mobile devices.
I've noticed that BranchOut requests have a custom notification message and stand apart from other app requests in my notifications.
Is this because BranchOut has a special partnership with Facebook?
The documentation states that the "message" value will not be displayed in the notification, so I'm curious how this is being done.
No it is not possible even with new_style_apprequest parameter in FB.ui options. This used to work earlier but it has stopped working lately. It was anyways an undocumented feature. This is my guess that you might require special permissions from Facebook to be able to achieve this.
it's definitely possible, using the parameter new_style_message set to true - you can double check this by reverse engineering their Javascript API library.
This is a sample code
FB.ui({
display: 'iframe',
method: 'apprequests',
new_style_message: true,
title: "Join my network",
message: "would like you to join his network",
to: [list of user ids to invite]
});
I am creating a mobile web app, and the friend request dialog works perfectly for me. But when my friend tries to do the app request, the dialog page starts, but gets stuck on loading and never works. Updated info - This only happens on mobile - tested the iphone and safari (with iphone user agent)...when tested in a website browser it works good for my friend.
Here is the code I used, and I am not getting any errors - it just hangs:
function sendRequest() {
FB.ui({
method: 'apprequests',
message: 'invites you to share real-time availability',
},
function(response) {
console.log('sendRequest response: ', response);
});
}
Has anyone else seen this issue? Appreciate any help!
Thanks,
Renee
From the above code, it appears you're missing the init(), login(), getLoginStatus() calls for the second user. It works with you because you may have already granted access to your app.
See:
https://developers.facebook.com/docs/reference/javascript/
and
https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/