Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send private messages to friends

I need to get via Facebook connect user's info and send a private message to all of his friends. Is it possible?

like image 731
yspro Avatar asked Apr 04 '10 12:04

yspro


People also ask

Can you send a private message on Facebook to someone who is not your friend?

You can send messages to anyone on Facebook. Messages you send to people you're not friends with may arrive in their Message Requests folder. Your messages also won't reach people who may have blocked you on Facebook chat or Messenger.

Can you message someone privately on messenger?

You can send a message to anyone on Facebook, regardless of friend status or privacy settings. The only exception applies to members you've blocked and those who've blocked you. Filtering preferences may inadvertently cause messages to go unseen, even though they have been delivered.


1 Answers

Sending private message through api is now possible.

Fire this event for sending message(initialization of facebook object should be done before).

to:user id of facebook

function facebook_send_message(to) {     FB.ui({         app_id:'xxxxxxxx',         method: 'send',         name: "sdfds jj jjjsdj j j ",         link: 'https://apps.facebook.com/xxxxxxxaxsa',         to:to,         description:'sdf sdf sfddsfdd s d  fsf s '      }); } 

Properties

  • app_id
    Your application's identifier. Required, but automatically specified by most SDKs.

  • redirect_uri
    The URL to redirect to after the user clicks the Send or Cancel buttons on the dialog. Required, but automatically specified by most SDKs.

  • display
    The display mode in which to render the dialog. This is automatically specified by most SDKs.

  • to
    A user ID or username to which to send the message. Once the dialog comes up, the user can specify additional users, Facebook groups, and email addresses to which to send the message. Sending content to a Facebook group will post it to the group's wall.

  • link
    (required) The link to send in the message.

  • picture
    By default a picture will be taken from the link specified. The URL of a picture to include in the message. The picture will be shown next to the link.

  • name By default a title will be taken from the link specified. The name of the link, i.e. the text to display that the user will click on.

  • description
    By default a description will be taken from the link specified. Descriptive text to show below the link.

See more here

@VishwaKumar:

For sending message with custom text, you have to add 'message' parameter to FB.ui, but I think this feature is deprecated. You can't pre-fill the message anymore. Though try once.

FB.ui({   method: 'send',   to: '1234',   message: 'A request especially for one person.',   data: 'tracking information for the user' }); 

See this link: http://fbdevwiki.com/wiki/FB.ui

like image 123
Somnath Muluk Avatar answered Sep 21 '22 13:09

Somnath Muluk