Facebook API getting summary of likes in `/links` without deprecated FQL -
i'm trying total likes count posts specific user. i'm calling /photos
/links
, /statuses
. when adding ?fields=likes.summary(true)
i'm getting total sum of likes in /photos
, /statuses
, doesn't work.
how can summary of likes (total count) links posted specific user?
i aware of option use fql, deprecated. (fql?q=select like_info, link_id,comment_info link link_id in()
)
use links
edge
me/links?fields=link,likes.summary(true)
the total_count
field value want. although documentation
total_count
represents approximate number of nodes on likes edge. actual number of results returned might different depending on privacy settings.
sample data feed
{ "link": "http://www.quora.com/permalink/cygokokwb", "id": "xxxxxxxxx", "created_time": "2015-04-26t02:08:48+0000", "likes": { "data": [ { "id": "xxxxxxxxx", "name": "xxxxxxxxx" } ], "paging": { "cursors": { "before": "mtaxntq2nti3otixota0mzg=", "after": "mtaxntq2nti3otixota0mzg=" } }, "summary": { "total_count": 1 } } }
edit
@cbroe in comments has sound advice, just like's count limit(0)
don't unnecessarily fetch lot of likes data , retrieve count.
me/links?fields=link,likes.summary(true).limit(0)
sample data
{ "link": "http://jdh.hamkins.org/transfinite-epistemic-logic-puzzle-challenge/", "id": "xxxxxxxxxxx", "created_time": "2015-04-19t04:00:18+0000", "likes": { "data": [ ], "summary": { "total_count": 1 } } }
Comments
Post a Comment