I'm trying to install the fb multi friend selector using javascript SDK following this link :
http://developers.facebook.com/docs/reference/dialogs/requests/
My question is : when i call the function :
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
}
Its open a pop up with all my friend and send a message but when i go to Facebook and open this notification it open a wrong url :
http://mydomain.com/?request_ids=448697108486876&ref=notif&app_request_type=user_to_user
So i wanted to know if it was possible to open a friend selector pop up and send a private message or a simple message on the wall to all friend users ? There is an existing code for that ? or i must develop my own code with Javascript SDK ?
Thanks you.
Yes, you can use the send dialog, if you had a multi friend selector and then the callback sent the array of selected friends to another function then you can call th send dialog, and put the callbacked users into the "to" field:
function sender(users_array) {
FB.ui({
method: 'send',
name: 'Name',
to: users_array,
link: '<Some_URL>',
});
}
https://developers.facebook.com/docs/reference/dialogs/send/
Related
how can post on my facebook friends wall using FB.UI
my code is
FB.ui({
method: 'feed',
link: 'https://developers.facebook.com/docs/',
to:['405631902932995,626150064162274'],
caption: 'An example caption'
}, function (response) {
console.log(response);
});
i am getting error like
API Error Code: 100
API Error Description: Invalid parameter
Error Message: ["100004585663846,100003018593104"] does not resolve to a valid user ID
That parameter only allows to enter one ID, not an array of them. Meaning, what you want to achieve is not possible at all, you can only specify one friend.
https://developers.facebook.com/docs/sharing/reference/feed-dialog/
You can also use the Send Dialog to send a message to a friend: https://developers.facebook.com/docs/sharing/reference/send-dialog
The same applies to the "to" parameter, you can only specify one recipient.
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
How does Branchout custom their Request Dialog messages? There is no option for this.
The documentation https://developers.facebook.com/docs/reference/dialogs/requests/ doest mention any extra parameters, only app_id, redirect_uri, message ,to , filters , exclude_ids , max_recipients, data, title.
As im a new user, i cant post images.. Here are the links: http://i.imgur.com/37tju.png ,
Im using the following javascript to call the facebook function:
FB.ui({
method : 'apprequests',
message : 'Message itself',
title : 'Title message',
display : 'iframe',
access_token : '(access_token)',
to : uids
}, function(response) {
if (response)
{
// handle callback.....
// (...)
}
});
There are some APIs with special privileges. You have to get a way of get in touch with Facebook. I don't know any docs for it.
there is no need to have special partnership to do such a thing.
Please check Is it possible to customize the apprequest notification message similar to BranchOut?
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.
I am developing an application which is based on user challenges. The app also requires a Facebook account to play.
I want a user to be able to select a bunch of friends he wants to challenge and send them an "invitation". But besides this, I need to find which friends did the user invite in order to save them to my database and "prepare" the challenge.
I managed to do the select-friends-dialog using this, but have no idea how to retrieve the selected users. Also, does this work on non-canvas Facebook applications? As I read that page, I am not sure whether it will work for my non-canvas application.
Here is my select-friends-dialog code:
function challengeFriends(){
FB.ui({
method: 'apprequests',
message: 'message",
title: 'title'
});
}
Any help is highly appreciated! Thank you.
I've written a tutorial that covers what you are asking for and other aspects of the Request dialog: How To: Send An Application Request Using The Facebook Graph API
The idea is to capture the request ids from the callback and save them in your DB, and within the request itself you can find the invitee id (friend id):
FB.ui({
method: 'apprequests',
message: 'Check out this application!',
title: 'Send your friends an application request',
},
function (response) {
if (response && response.request_ids) {
var requests = response.request_ids.join(',');
$.post('handle_requests.php',{uid: <?php echo $uid; ?>, request_ids: requests},function(resp) {
});
} else {
alert('canceled');
}
});