问题
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.
回答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.
回答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.*
回答3:
You can do it using CHAT API. But it is limited plain text messages.
来源:https://stackoverflow.com/questions/4363515/sending-private-messages-through-facebook-api