22

Possible Duplicate:
Facebook Api - send private messages to friends

I know that it is not officially possible to send private messages through FB API. Every thread in SO says so too. But I was using RockMelt browser and when you invite somebody, a private message is sent to them. Means it is possible to send private messages through API. More importantly, Facebook is okay with it.

Any guesses on how they are using it? Is it some HTTP POST trick using sockets? BTW, we are going to use this feature only on user initiated actions.

Community
  • 1
  • 1
mixdev
  • 2,724
  • 2
  • 30
  • 25

3 Answers3

5

You can now view and respond to messages on Facebook Pages via the Graph API but you still can't initiate a conversation, only respond to a user that has already messaged you.

From the docs linked above:

*You can reply to a user's message by issuing an HTTP POST to /CONVERSATION_ID/messages with the following parameters [conversation id, message]. A conversation ID look like t_id.216477638451347.*

JiminyCricket
  • 7,050
  • 7
  • 42
  • 59
5

Reading messages is possible with the new messaging framework, available to registered developers only.

Have a read of this page - that's about all that I'm aware of currently:

http://developers.facebook.com/docs/reference/api/message

Sending, however, is not.

Mark Mayo
  • 12,230
  • 12
  • 54
  • 85
  • But that's just read only access. Right? Can we SEND a message with it? – mixdev Dec 06 '10 at 17:05
  • yeah currently the only access to the messages component at all is via registered access, and even then it's only read. When the new messaging system comes in, maybe you'll get it, but currently - no. – Mark Mayo Dec 06 '10 at 17:48
  • http://developers.facebook.com/blog/post/428 - "To comply with existing policies and laws that prohibit unsolicited email, and ensure that users are in control of their inbox, we aren’t currently permitting developers to send messages to @facebook.com email addresses, and have updated our policies to reflect this." – Mark Mayo Dec 06 '10 at 17:49
  • http://developers.facebook.com/blog/post/291 - "While we currently don't allow applications to send messages through this API, we're always thinking about new functionality to offer through Facebook Platform. " – Mark Mayo Dec 06 '10 at 17:50
  • The iPhone facebook-app, which uses the Graph API, can send messages. – kohlehydrat Mar 08 '11 at 15:09
  • May find that since it's an official app made by Facebook that they've turned it on just for that. Checked their documentation again today and it still says that (officially anyway) they don't allow apps to send messages through the API. – Mark Mayo Mar 08 '11 at 18:11
3

You can do it using CHAT API. But it is limited plain text messages.

gabrielpalomino
  • 331
  • 3
  • 8