I have a api call to get post comments as such:
/{postid}?fields=comments.limit(0).summary(true)
This works fine and get this response:
{
"comments": {
"data": [
],
"summary": {
"order": "ranked",
"total_count": 2,
"can_comment": true
}
},
"id": "x"
}
However, this does not show comments on shares, which I have 8 of in that regard, bringing the total reported to 10 when it comes to that metric being pulled into overall engagements. Leaving out the 8 is where I fall short comparing the engagements facebook is showing me on the front end.
Does anyone know how to get the comments on shares as well as the comments? I can't seem to find the right call to make to get that. Much appreciated in advance!
Related
I'm currently using Google's api for fetching reviews of a Google My Business Account. We do this for our clients, which have to enable oauth for us, so we can have an access token and a refresh token.
The response we get, has the following structure:
url: https://mybusiness.googleapis.com/v4/accounts/{account_id}/locations/{location_id}/reviews
{
"reviews": [
{
"reviewId": "some-id,
"reviewer": {
"profilePhotoUrl": "some-url",
"displayName": "Some Sample Name"
},
"starRating": "FOUR",
"comment": "Some long comment left by the user.",
"createTime": "2021-02-15T14:35:19.252Z",
"updateTime": "2021-02-15T14:35:19.252Z",
"reviewReply": {
"comment": "Some long reply by the business.",
"updateTime": "2021-03-04T16:49:32.973Z"
},
"name": "accounts/{account_id}/locations/{location_id}/reviews/{review_id}"
},
...
],
"averageRating": 4.5,
"totalReviewCount": 1312,
"nextPageToken": "some-page-token"
}
The problem is, for some set of clients, we are getting just an empty object (literally, we are receiving {} as the response body). We are not sure why this is happening, since we are able to see reviews on the client's web site, and we are not getting any error. We've refreshed tokens and refreshed tokens without any success.
I've tried posting a support ticket with GCP in order to get some guidance, but it seems that you don't get any help in this kind of issues if you don't have the right support plan.
Anyhow, any help on this issue (why is happening? can it be fixed? is it a setup problem? etc.) is very much appreciated.
I've been playing with Facebook Graph API a little bit and everything works just fine, I can get the feed of my page, the comments, but have a problem with likes.
It turns out that when I make an api call from Graph API Explorer like this:
me/posts?fields=likes.summary(true)
I get the correct response:
{
"likes": {
"data": [
],
"summary": {
"total_count": 0,
"can_like": true,
"has_liked": false
}
},
"id": "000000000_00000000"
},
ID is edited for this example. However when I make this call from server, I just get an empty array.
Does anybody know, what's the matter and how to solve this? Thanks
Okay, it turns out that the method "toArray()" made the likes array empty. I'll find another way to convert the GraphEdge to Array.
For a small Facebook Sales Group Monitor I need to query the group's new posts. I've intended to do this via the Graph API, requesting only posts which have been either
created since the last query (created_time) or
updated since the last query (updated_time).
This, however, seems not to be possible.
Omitting all non-date fields, a GET /v2.7/<group-id>/feed request returns the following data:
"data": [
{
"updated_time": "2016-01-12T20:11:02+0000",
"created_time": "2014-09-16T09:55:39+0000",
"id": "552364968142715_789142084465001"
},
{
"updated_time": "1970-01-01T00:16:40+0000",
"created_time": "2016-08-28T19:15:53+0000",
"id": "552364968142715_1183108935068312"
},
{
"updated_time": "1970-01-01T00:16:39+0000",
"created_time": "2016-08-29T14:13:22+0000",
"id": "552364968142715_1183722648340274"
},
{
"updated_time": "1970-01-01T00:16:38+0000",
"created_time": "2016-08-28T09:15:05+0000",
"id": "552364968142715_1182673285111877"
},
...
]
The first entry is from the pinned group-rules post, created in 2014, updated 2016.
The second and fourth entries are both from yesterday, the third post is from today.
All but the first post have updated_time-timestamps close to the UNIX epoch's beginning. With a few exceptions, the value seems to be decreasing by 1 second for every post in the list, even when requesting 100+ posts.
The API Reference for Group feeds states, that the since=<timestamp> query parameter only applies on the updated_time field, which does not help in this case.
Is there any way to filter for or at least sort by the created_time value?
I am running into same problem. It seems currently created_time only apply for Page feed, not Group feed at the moment :(
I have asked some old questions previously but those were quite misleading. So I decided to delete them and creating this one.
My object has a custom property named say it is portal content. In the Facebook Graph API Explorer data related to this object shown like;
{
"created_time": "2015-11-26T08:42:26+0000",
"title": "Title",
"type": "ns:type",
"data": {
"portalcontent": "portalcontent"
},
"id": "12515125125"
},
{
"created_time": "2015-11-26T08:04:09+0000",
"title": "Title2",
"type": "ns:type",
"id": "412512512512"
},
{
"created_time": "2015-11-25T12:56:03+0000",
"title": "Title3",
"type": "ns:type",
"id": "234124124124"
}
I am trying to query this data using Facebook graph api. But can not fetch just based on the portal content custom property.
So far I tried;
appid/objects?pretty=0&type=ns:type&limit=100&portalcontent=portalcontent
to do so. But it is still fetching all objects.
PS: please pm or comment on question for why you are downvoting it. Provide what else you need that I must put on the question. Downvoting for no reason getting people annoyed.
There's currently no way to filter results other than those described on the respective endpoint's docs.
See
https://developers.facebook.com/docs/graph-api/reference/application/objects/
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5
Regarding Graph API, shares count of post, shares count of post's insights and shares count displayed on page are not identical. I've assumed that these represent same count. Is my assumption wrong?
From post:
https://graph.facebook.com/XXXX_YYYY
{
"id" : "XXXX_YYYY",
...
"shares": {
"count": 1 !!!!!
}
...
}
From post's insights:
https://graph.facebook.com/XXXX_YYYY/insights
[
...
{
"id": "XXXX_YYYY/insights/post_storytellers_by_action_type/lifetime",
"name": "post_storytellers_by_action_type",
"period": "lifetime",
"values": [
{
"value": {
"like": 90,
"share": 14, !!!!!
"comment": 10
}
}
],
"title": "Lifetime Talking About This (Post) by action type",
"description": "Lifetime The number of unique people who created a story about your Page post, by action type. (Unique Users)"
}
...
]
On facebook page: 4 shares !!!!!
Thanks.
I see the same problem on my side, api has had many issues since 2012 started (at least for me) , I think you have better luck reporting this as a bug on Facebook, they can give you a better insight and solve the problem on their side
Url : Facebook Bugs