This question already has answers here:
Closed 10 years ago.
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.
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.
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.*
You can do it using CHAT API. But it is limited plain text messages.
Related
I would like to know that we are having a lead generation campaign running on Facebook but few of the times our staff isn't available to answer the query on Facebook messenger, so based on that short-coming I am thinking to devise a mechanism that "If within 1 hour of user's message no one replies to him then an automated BOT message should get sent to him."
Please don't deprecate this question as it is based entirely on knowledge. And if perhaps someone has hints or links on how to achieve this thing then I will really appreciate it.
Thanks.
Some options:
You can query your /conversations edge every X minutes to detect when there is a message from a user which has not been replied to, then you would send the automated message using Send API.
https://developers.facebook.com/docs/graph-api/reference/v10.0/conversation
https://developers.facebook.com/docs/messenger-platform/reference/send-api/
You can use webhook data for incoming messages to create a task that will run at received_time + 60 minutes, find the thread in your conversations edge based on PSID and then check if there has been a reply
Alternatively you can check out Handover Protocol which allows a Page to simultaneously use a Messenger Bot and Live chat agent to handle messaging
https://developers.facebook.com/docs/messenger-platform/handover-protocol/
I am developing an application which manages Facebook pages. I wanted to understand if there's any method where using API, we can communication with users who have commented on my page through private message.
Thanks in advance and reading the question.
Thanks,
Hardik
That would be the conversations endpoint: https://developers.facebook.com/docs/graph-api/reference/v2.3/page/conversations
Be aware that you canĀ“t initiate the communication, you can only reply to a user message and you can only send 2 messages before the user responds: https://developers.facebook.com/docs/graph-api/reference/v2.3/conversation/messages#publish
I would like to know how to send Multiple Direct message on Twitter. In my app using twitter api, i am able to send Direct message to one( Using DM Syntax ).
Currently i can see some tools like MultiDM website allows to send multiple Direct messages at a time.
So is that possible from iPhone's twitter api?
Also i wonder how the MultiDM website works as such
Pls let me know
In twitter API there is only 1 method of sending a DM: https://dev.twitter.com/docs/api/1/post/direct_messages/new
If you need to send multiple DM's - just call this method multiple times (with different recipient)
Yes you cant send DM to more than one user in a single call of the API.
If you want to send DM to multiple users, just make an array of all users id or screen name and in a loop send direct messages to All through the below API...
https://dev.twitter.com/docs/api/1/post/direct_messages/new
I'm adding a private messaging system to my app,
so users could send private message to their friends.
I thought I could use the send dialog, but the link param seems to be required.
Is there any reason to require that property ?
Is there any other way to send private messages ? (Except XMPP Chat)
Thanks.
No, those are your two only options (send dialog and chat api).
You can also let one user write on the other users wall and set the privacy so that only they can view the message, but that is not really what you're after from what I understand (neither is the chat api btw, since it works only if the two users are online at the time).
I found this thread which talks about it in length: how send message facebook friend through graph api using Accessstoken
And in that case what's the name of the permission/method/function etc.
I believe user-to-user is possible (At least I have seen for chat in OmgPop)
For application to user,
You can only read for now using the /inbox endpoint.
You will need the read_mailbox permission.
You can read more from the 2009 post.
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.