Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is read_mailbox (Facebook API)

Tags:

php

facebook

I have used ('GET', 'me/inbox') to get my inbox messages by php for about 2-month. But it seems to fail now. So, I checked the permission on Graph API explorer, and found that "read_mailbox" is not on the list. Where is read_mailbox ?

The second question: I tried to use "read_page_mailbox" to achieve the some goal but I don't know how to get conversation-id. Can someone help me or give me examples for read_page_mailbox ?

==UPDATE==

Here is my code.

session_start();

define('FACEBOOK_SDK_V4_SRC_DIR', 'facebook/php-sdk-v4/src/Facebook/');
require __DIR__ . '/facebook/php-sdk-v4/autoload.php';

use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\GraphUser;
use Facebook\FacebookRedirectLoginHelper;

FacebookSession::setDefaultApplication($app_id , $app_secret);
$session = new FacebookSession($token);

$user_inbox = (new FacebookRequest($session, 'GET', '/me/inbox'))->execute()->getGraphObject(GraphUser::className());
print_r($user_inbox);

And I tried to follow this page to use read_page_mailbox. https://developers.facebook.com/docs/graph-api/reference/v2.4/conversation How to get the conversation-id ?

Thank you.

like image 328
yutseho Avatar asked Jan 07 '23 23:01

yutseho


1 Answers

See

  • https://developers.facebook.com/docs/apps/changelog#v2_4

The /v2.4/{user_id}/home, /v2.4/{user_id}/inbox, and /v2.4/{user_id}/notifications edges as well as read_stream, read_mailbox, and manage_notifications permissions are deprecated in v2.4.

like image 85
Tobi Avatar answered Jan 14 '23 18:01

Tobi