Facebook SDK 5.3在正文中返回空的'data'数组

时间:2016-10-31 11:39:11

标签: facebook facebook-graph-api facebook-php-sdk

使用以下代码:

$postId = "<userid>_<post_id>";

$this->facebook = new Facebook([
    'app_id' => $container->getParameter('facebook_client_id'),
    'app_secret' => $container->getParameter('facebook_client_secret'),
    'default_graph_version' => 'v2.5',
]);

$app = $this->facebook->getApp();

$request = new FacebookRequest(
    $app,
    '<access_token>',
    'GET',
    '/' . $postId . '/sharedposts?fields=from,via'
);

$response = $this->facebook->getClient()->sendRequest($request);

print_R($response); exit();

返回以下内容:

[body:protected] => {"data":[]}
[decodedBody:protected] => Array
    (
        [data] => Array
            (
            )

    )

但我可以在Facebook内清楚地看到,我在查询的帖子ID中有评论,分享等等

我的最终目标是查看其他FB用户共享FB的帖子的次数

0 个答案:

没有答案