要求在v2.3 API中获得Facebook页面喜欢的总数 [英] Request to get total count of Facebook page likes in v2.3 API

查看:103
本文介绍了要求在v2.3 API中获得Facebook页面喜欢的总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前,我使用的是FQL,但是从v2.1开始就不推荐使用FQL,而是使用图形边缘喜欢移动到v2.3。



这是我的网址:

  https://graph.facebook.com/v2.3/<page_id> / likes?access_token =< access_token>& summary = true 

- 但是省略了 total_count ,当 Facebook docs - 你会看到我的意思。

解决方案>

现在(2016年4月),任何绊倒这个答案的人都会感到沮丧,因为接受的答案在v2.6中不再有效。



?fields = likes / likes 现在返回相同的结果 - >页面所喜欢的页面。



要获取粉丝的数量,你n ow需要使用 fields = fan_count

  https://graph.facebook.com/pepsius/ ?字段= fan_count&安培; =的access_token<&的access_token GT; 

如上所述,您还可以直接使用pagename进行请求,无需获取pageID。


Previously I was using FQL for this, but this is deprecated as of v2.1 and I'm moving over to v2.3 using the graph edge "likes".

Here is my URL:

https://graph.facebook.com/v2.3/<page_id>/likes?access_token=<access_token>&summary=true

This returns detail JSON with paging info - but it omits the total_count which is supposed to be returned when "summary=true" is used as described in the Facebook docs - you'll see what I mean.

解决方案

Anyone stumbling onto this answer now (April 2016) will get frustrated because the accepted answer no longer works in v2.6

?fields=likes and /likes now return the same result -> the pages that the page likes.

To get the number of fans, you now need to use fields=fan_count

https://graph.facebook.com/pepsius/?fields=fan_count&access_token=<access_token>

As you can see above, you can also make the request directly with the pagename, no need to fetch the pageID.

这篇关于要求在v2.3 API中获得Facebook页面喜欢的总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆