Search code examples
restfb

Read page messages


Im aware, that read_mailbox permission was removed in FB API>2.4. I need access to page related messages. So i have a page and someone is sending private message on this page (not directly to the user). Is there any API to read such messages?

So i need something like:

Connection<Conversation> conversations = facebookClient.fetchConnection("me/conversations", Conversation.class);

For page related messages,

Such API is available?

Best regards, KB


Solution

  • It depends on your use case. The API you mention is already available, but you can only use it to read private Messages. I suggest to use the messenger platform webhook. This can trigger a poll on me/conversations if you need the whole thread. If you are only interested in the content of the incoming message, you don't need your endpoint and work only with the messenger platform. Webhook + Send API may be enough: https://developers.facebook.com/docs/messenger-platform