我试图通过使用Facebook图形API来获得帖子的总份额。根据Facebook(1)提供的图形API文档,如果我请求具有字段shares
的帖子,它将返回该帖子的共享计数。
例如,
https://graph.facebook.com/{post-id}?shares&access_token=xxxx
我还尝试将摘要参数(summary = 1)放在url中以获取共享计数,但它没有返回任何共享计数。另一方面,使用相同的方法返回likes
和comments
总计数。我在这里错过了什么吗?
答案 0 :(得分:0)
您的语法不正确。要访问字段,您的参数应为fields = XXX,如下所示:
var app = angular.module('youAppModule', []);
app.controller('controllerName',['$http', function($http){
// the above code in here
}]);