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
Related
I am developing a Facebook Canvas App which allows user to post a link to their wall:
function postFeed(){
FB.ui({
method: 'feed',
link: 'https://apps.facebook.com/?????',
name: '?????',
description : '?????',
picture: '?????',
}, function(response){});
}
It works fine on desktop (all browsers including desktop Chrome) and mobile Firefox. However when I use mobile Chrome or Android Facebook App's internal browser to open it, the following message shows up when I run postFeed() and be redirected to the feed dialog:
An error occured. Please try again later.
API Error Code: 110
API Error Description: Invalid user id
Error Message: Missing user cookie (to validate session user)
postFeed() is called after I run the following code:
FB.login(function(response) {
if (response.authResponse) {
alert("Welcome!");
}
}, {scope: 'public_profile'});
However if I remove the above code, the error message disappears and I can see the feed dialog normally.
Is there any possible reasons/solution that can solve the problem but without removing the above code?
Thank you very much.
I use 'share' instead of 'feed' method and the problem is gone.
Here is my send javascript code:
function send(id, description, title) {
FB.ui({
app_id: '390841657651335',
method: 'send',
description: description,
link: http://vic.bg/Vits.aspx?vicid=' + id,
name: title
}
}
Send is always ok (i dumped the response from the callback to the console), but recients got that message
Attachment Unavailable This attachment may have been removed or the person who shared it may not have permission to share it with you
instead of the actual post. Did someone face that problem?
The problem was with the settings of the application Sandbox Mode: was checked.
I do not know why they display such strange message in that case
So, did the 'send dialog' worked for you? because from all of my research and reading all posts related, facebook currently doesn't allow to send private messages to friends through graph api..
I'm trying the 'send dialog' via a direct URL and not via JS SDK.
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'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 trying to create a Facebook Request Dialog with JS SDK inside a Facebook page iframe tab. The dialog shows up, I can select people from my friends, I get no error not even after I click "Send Request", but my friends don`t receive the notification. This is my code:
FB.ui(
{
method: 'apprequests',
message: 'request'
}, function(response) {
console.log(response);
});
LATER EDIT: I uploaded a file with exactly their code from documentation on this tab: http://www.facebook.com/pages/WebTest/255282254520859?sk=app_230016043737427 , and my friends still can`t see the requests.
Have you run it with a Firebug / Chrome console open? Maybe an exception is being generated and dumped there.