attached got a question ... I try with all feeds Likes and Comments retrieve a page during a period. or .. actually I only need the total number of likes and comments overall.
So far ...
$user_pages = $facebook-> api ('/ me / accounts');
...
$page_feeds = $facebook-> api ("/". $ page_name ['id']. '/ feed', 'GET', array ('limit' => 10000, 'since' => mktime (0,0, 0, date ("m"), 1, date ("Y"))));
...
foreach ($page_feeds ['data'] as $ page) {
$c = $facebook-> api ("/" $ page ['id'] "/ likes", "GET", array ('limit' => 10000)..);
$temp ['likes'] = count ($ c ['data']);
$c = $ facebook-> api ("/" $ page ['id'] "/ comments", "GET", array ('limit' => 10000)..);
$temp ['comments'] = count ($ c ['data']);
}
.....
So I get all the pages in which I am admin, then all feeds the Page since the first of the month. This has been going on forever until the answer is there. But the problem is I only get max 25 max 25 Likes and Comments. (the word "counts" as described in the API documentation but I missing here.
So now I have to call in the loop every feed all the likes and comments on it and then to get the number.
These queries take now to three minutes ... which is clearly too long ...
Is not it ne nice way? I have been able to find anything. I was hoping I this query
$page_feeds = $ facebook-> api ("/". $ page_name ['id']. '/ feed', 'GET', array ('limit' => 10000, 'since' => mktime (0,0, 0, date ("m"), 1, date ("Y"))));
can adjust, and then ALL likes and comments (or at least the numbers) to get
150769909716/feed?fields=likes.limit(10000).fields(id),comments.limit(10000).fields(id)&limit=10000&since=1372608000
unfortunately gives me back a maximum of only 25 likes and comments.
Timo
#Edit:
https://graph.facebook.com/[pageid]/feed?fields=likes.limit%2810000%29.fields%28id%29,comments.limit%2810000%29.fields%28id%29&locale=de_DE&since=1372608000&limit=10000&access_token=yyyy
give me:
{
"data": [
{
"id": "xxx_xxx",
"created_time": "2013-07-23T07:08:25+0000",
"likes": {
"data": [
{
"id": "xxxx"
},
],
"paging": {
"cursors": {
"after": "xxx",
"before": "xxxx"
},
"next": "xxxx"
}
},
https://graph.facebook.com/[pageid]/feed?since=1372608000&limit=10000&access_token=yyyy
giv me: (yes, my Count is there...but only browsercall)
"likes": {
"data": [
{
"name": "xxx",
"id": "xxx"
},
],
**"count": 53**
},
the same call per call give me the result without Count data....