0
我正在使用Facebook的PHP API。我只想获取用户状态的消息(字符串)。在我的代码中,它返回了很多字段,但我只想获取消息字段。我怎样才能做到这一点?获取状态的消息Facebook的API API
$request = new FacebookRequest($sess,'GET','/400495666788117');
$response = $request->execute();
$graph = $response->getGraphObject();
echo '<pre>' . print_r($graph, 1) . '</pre>';
输出:
Facebook\GraphObject Object
(
[backingData:protected] => Array
(
[id] => 400495666788117
[from] => stdClass Object
(
[id] => *******
[name] => *******
)
[message] => aaa
[updated_time] => 2015-03-02T11:59:12+0000
请定义错误或代码有什么反应你得到 – 2015-03-02 12:55:29
您可以在需要打印$ graph-什么只打印>消息; – 2015-03-02 12:55:38
@NarendraSisodia我已经把它作为输出 – 2015-03-02 12:58:58