Sending private messages through Facebook API
Solution 1
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.
Solution 2
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.*
Solution 3
You can do it using CHAT API. But it is limited plain text messages.
Related videos on Youtube
mixdev
Updated on July 09, 2022Comments
-
mixdev almost 2 years
Possible Duplicate:
Facebook Api - send private messages to friendsI 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.
-
Somnath Muluk about 12 yearsNow it is possible to send private messages through Facebook API. I have given solution.
-
Trevor over 10 yearsConsider this post: stackoverflow.com/questions/9598369/…
-
alhelal over 2 years@SomnathMuluk where is your answer?
-
-
mixdev over 13 yearsBut that's just read only access. Right? Can we SEND a message with it?
-
Mark Mayo over 13 yearsyeah 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 over 13 yearsdevelopers.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 over 13 yearsdevelopers.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. "
-
kohlehydrat about 13 yearsThe iPhone facebook-app, which uses the Graph API, can send messages.
-
Mark Mayo about 13 yearsMay 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.
-
Even Cheng over 10 yearsthis seemed to phase out after graph api was introduced
-
ElSajko over 8 yearsBut is there way to auto-initiate(by user) conversation-with-my-page ?
-
shukshin.ivan over 8 yearsBy 2015 it is deprecated :(
-
Dellirium about 6 years@EvenCheng can you elaborate a bit further, the documentation says it is possible, yet every time I try this i get an error message, what do you mean phased out after the graph api was introduced?
-
alhelal over 2 yearsI need some help on this. Can you explain your answer with a example