如何获得评论''喜欢'的详细格式,如帖子在PHP中

时间:2012-03-22 11:19:22

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

使用PHP API时posts'likes有详细格式

[likes] => Array
    (
        [data] => Array
            (
                [0] => Array
                    (
                        [name] => Ergec Senturk
                        [id] => 614603990
                    )
            )
        [count] => 1
    )

likes的{​​{1}}仅作为计数的数字而非详细提供

comments

如何以详细格式获取[likes] => 1 'comments

编辑:我用它来发帖子

likes

1 个答案:

答案 0 :(得分:1)

好的,我找到了。以下是未来Google员工的解决方案

$likes = $facebook->api('/comment_id/likes');

comment_id是格式为xxxxxxxxxxxxxxx_xxxxxxxxxxxxxxx_xxxxxxx