如何找到总喜欢,评论,分享每天在facebook上的红宝石上

时间:2017-02-06 05:00:08

标签: ruby-on-rails ruby facebook-graph-api koala

我试图在facebook中每天获得喜欢,分享,评论的总数,但它不起作用。我用的是考拉宝石。

我试过了:

graph = Koala::Facebook::API.new(ACCESS_TOKEN)
likes = graph.get_object(post_id, fields: 'likes.summary(true)', since: '2017-01-23', until: '2017-01-24')
shares = graph.get_object(post_id, fields: 'shares.summary(true)', since: '2017-01-23', until: '2017-01-24')
comments = graph.get_object(post_id, fields: 'comments.summary(true)', since: '2017-01-23', until: '2017-01-24')

提前致谢:)

0 个答案:

没有答案