获取用户的facebook帖子';的朋友,包括“;xyz感到“***”;


Get facebook posts of a user's friend, that includes " xyz is feeling *** "

我正试图得到一位用户朋友的帖子,上面写着"xyz感到难过"。问题是我只得到"xyz更新了他的状态"。我使用facebook API在php中进行编码。这是我的项目中的一段代码

$accessToken = $this->getNewLongAccessToken($user_id,$user_id);
        $session = $this->getActiveSessionForAccessToken(trim($accessToken));
        if ($session) {
            try {
                $response['feeds'] =  (new FacebookRequest(
                        $session, 'POST', '/?batch='.urlencode(json_encode($posts))
                        ))->execute()->getGraphObject()->asArray();
                        unset($posts);
            } catch (FacebookRequestException $e) {
                //die("Exception occured, code: " . $e->getCode());
                die(" with message: " . $e->getMessage());
            }
        } else {
            die("invalid session ");
        }
    }
    $response['facebook_friends_ids'] = $facebook_friends_ids;
    $users = array();
    if(isset($response['feeds']) && !is_null($response['feeds'])){
        foreach($response['feeds'] as $f){
            if(isset($f->body)){
                $users[] = json_decode($f->body);
            }
        }
    }
    echo print_r($users);
    exit;

这是我的输出

[1] => stdClass Object
    (
        [data] => Array
            (
                [0] => stdClass Object
                    (
                        [id] => 10204368080380360_10207876135079535
                        [from] => stdClass Object
                            (
                                [name] => XYZ
                                [id] => 10204368080380360
                            )
                        [story] => XYZ updated his status.
                        [story_tags] => stdClass Object
                            (
                                [0] => Array
                                    (
                                        [0] => stdClass Object
                                            (
                                                [id] => 10204368080380360
                                                [name] => XYZ
                                                [type] => user
                                                [offset] => 0
                                                [length] => 16
                                            )
                                    )
                            )
                        [actions] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [name] => Comment
                                        [link] => https://www.facebook.com/10204368080380360/posts/10207876135079535
                                    )
                                [1] => stdClass Object
                                    (
                                        [name] => Like
                                        [link] => https://www.facebook.com/10204368080380360/posts/10207876135079535
                                    )
                                [2] => stdClass Object
                                    (
                                        [name] => Share
                                        [link] => https://www.facebook.com/10204368080380360/posts/10207876135079535
                                    )
                            )
                        [privacy] => stdClass Object
                            (
                                [value] => 
                                [description] => 
                                [friends] => 
                                [allow] => 
                                [deny] => 
                            )
                        [type] => status
                        [status_type] => mobile_status_update
                        [created_time] => 2015-11-09T11:07:27+0000
                        [updated_time] => 2015-11-10T07:03:21+0000
                        [is_hidden] => 
                        [is_expired] => 
                        [likes] => stdClass Object
                            (
                                [data] => Array
                                    (
                                        [0] => stdClass Object
                                            (
                                                [id] => 10152657992473469
                                                [name] => **********
                                            )
                                        [1] => stdClass Object
                                            (
                                                [id] => 634582776638368
                                                [name] => *************
                                            )
                                    )
                                [paging] => stdClass Object
                                    (
                                        [cursors] => stdClass Object
                                            (
                                                [after] => NjM0NTgyNzc2NjM4MzY4
                                                [before] => MTAxNTI2NTc5OTI0NzM0Njk=
                                            )
                                    )
                            )

总之,我有没有办法知道用户的朋友是否更新了任何"感觉"类型的状态。谢谢!

我已经强调了我想在这张照片中得到什么

这是来自Facebook Graph API资源管理器的响应

使用facebook图形api无法获得它。