4

Hi I'm developing management system for Facebook pages.
All Facebook pages are changed to sytle of timeline by the end of March, they will come to receive message from users.
So I want to add to read inbox of Facebook page, but I can't find how to read it by Graph API. ("/inbox" method is not worked with page access token.)
Please let me know how to do if you know.

Thanks,
Ogawa

Tomohide Ogawa
  • 41
  • 1
  • 1
  • 3

2 Answers2

17

I have suffered alot to find the correct url. It is totally different url compare to Profile messaging.

You can read the messages for a page by issuing an HTTP GET request to http://graph.facebook.com/PAGE_ID/conversations with a Page Access Token and read_mailbox permission.

Surprisingly you can reply for page messages also.

You can reply to a user's message by issuing an HTTP POST to http://graph.facebook.com/CONVERSATION_ID/messages

Note that a page can only reply to a user's message. It cannot initiate a private message with a user. Also, a page can respond not more than twice to a user's message before the user has replied back.

Hope that helps.

Jeyara
  • 2,198
  • 1
  • 23
  • 26
  • 2
    This is documented now: https://developers.facebook.com/docs/reference/api/page/#conversations – K. Weber Jul 29 '13 at 10:32
  • 1
    I found this post helpful as well: [link](http://blog.waltschlender.com/how-to-scrape-fan-page-message-from-facebook/) – Bouramas Jan 09 '17 at 10:10
0

Graph api explore use this script after authenticating user, permission required

permission script:

$loginUrl = $facebook->getLoginUrl(array(

        'scope'=>'email,read_mailbox,read_requests',

    ));

READ INBOX:

<?php
$user_mail=$facebook->api('/me?fields=id,name,inbox.limit(10)');
echo'<pre>',print_r($user_mail),'</pre>';
?>
BMW
  • 42,880
  • 12
  • 99
  • 116