如果我有一个
[0] => Array
(
[id] => 364728713652547_384117421713676
[from] => Array
(
[category] => Professional services
id 是 facebook authorid_postid 所以链接是https://www.facebook.com/364728713652547_384117421713676
我想在页面上获得 76 的 like butoon '76 like this'。
当我使用 FQL 时
SELECT comment_count, like_count, share_count, click_count, total_count from link_stat where url='https://www.facebook.com/364728713652547_384117421713676'
我得到了一个结果
{"data": [
{
"comment_count": 0,
"like_count": 0,
"share_count": 0,
"click_count": 0,
"total_count": 0
}]}
如果我点击标题,我会重定向到一个网址为:https ://www.facebook.com/pages/Knowles-Gripping-Services/364728713652547?ref=stream
然后我再次使用 FQL
SELECT comment_count, like_count, share_count, click_count, total_count from link_stat where url='https://www.facebook.com/pages/Knowles-Gripping-Services/364728713652547?ref=stream'
我得到了我想要的正确结果:
{"data": [{
"comment_count": 0,
"like_count": 76,
"share_count": 0,
"click_count": 0,
"total_count": 76
}]}
那么,有谁知道有没有办法在 facebook api 中获取“重定向页面 url”?(我不想使用 php 并阅读 http 标头)还是使用 post_id 获取 like_count?非常感谢您。