Facebook Graph API | Marketing Insights - Count Shares and Likes, Haha, Love...Etc for an AD - facebook

Is it possible to get Share Count as well the actions count for likes, ahah, dislike etc via the Facebook API / Marketing insights?
So far I'm able to get this data for posts(which are related to ads if promoted), but this is a lifetime metric I can't have the numbers in a daily basis, unless I calculate it by doing the difference once I have the data.
Also, I would never now, if the likes are being made by someone who saw my post somewhere because its promoted, or if that person went directly to my page.
Is there any way to achieve this results?

If you look at the actions field in insights, you should see a field called post_reaction which is the total number of reactions for your ad in the requested timeframe.
To get a daily breakdown, use time_increment=1 and time_range to specify the date range.
I don't believe we provide breakdowns on the different reaction types however.
Docs for parameters:
https://developers.facebook.com/docs/marketing-api/insights/parameters/v2.9

Related

Facebook Graph API /{page-id}/posts - only 600 posts per year?

Currently I am writing a wrapper around the Facebook Graph API to collect all the posts made on specific pages.
For some reason, I am only able to query 600 posts per year. When there is more than that on a page, the API does not complain but randomly leaves out posts. To me there is no rhyme or reason which posts are left out: Certain weeks are completely unaffected, while for others I only get a partial amount of posts or none at all.
Carefully reading the API yields this statement:
The API will return a maximum of 600 ranked, published posts per year.
So, it seems like this is intended behavior.
However, this question from 2015 suggests that this limit is a bug.
Furthermore, I am able to retrieve the full list of posts via the data export of the insights tab in Facebook itself. It seems bizarre to me that I am not able to do the same with the API.
Essentially I have three questions:
Is the year limit intended behavior?
If the limit is intended, what determines which 600 posts are returned per year?
If the limit is intended, is there a way to get around it to retrieve a full list of post(-ids)?
Yep, I've seen this myself, particularly with pages that publish in high frequency such as newspapers. When retrieving posts historically there can be single days missing, the odd week and sometimes a whole month. The only way to not miss any posts is to call the API daily but this only helps moving forward. Or you can contact me and I'll see if we have the posts you're looking for ;-)

Retrieving friend count delta

I've been looking through the Facebook-graph API for a way to get a kind of 'delta' of friend changes since a given date. it looks like the /<id>/friends end point will give me a total count at the current time. What I'd like is that same value but for a historic date (i.e. where the date is this time last year, so that I can see how many friends someone has made/lost since then).
(I was originally hoping Facebook would just let me see when people became friends, but it looks like a user's friends list, and all the related details, are off limits).
Unfortunately I can't just rely on the use of future dates, though that may be the solution I end up with (as in, I request the count at the current date, and then at some point in the future request it again and compare the difference).
I can see from my own Facebook account that they do track when a friend/connection was made, and I'm not looking to dig up details on the friend/connection. Ideally I'm looking for something like /<id>/friends?asat=<date>
As a follow up question assuming this feature isn't available through the facebook-graph API, how would I go about requesting this feature for a future version?
There is no way to get the history, you can only call the API endpoint on a regular basis and store the difference with date on your own.
Feature requests can be sent here: https://www.facebook.com/help/contact/268228883256323
...although, i doubt that they will implement this, to be honest. Those kind of "insights" are usually only available for Pages, but not for User Profiles.

Facebook analytics redacted

I am sending various events from my Unity iOS game to Facebook analytics and logging them. I can see all the events being registered properly. Till few days back I was able to see breakdown of events into sections like country, gender, region,etc. But now in place of details like how many downloads per country the breakdown is showing Redacted.
Has anyone faced this problem? What can be the cause of this?
This is most likely because the user count for the date range you're querying has dropped below 100 users. Demographic data is redacted below that level to protect user identity. For some reports (page likes, household income etc) the redaction level is slightly higher at 1000 users.

Collecting Data from Facebook Group

I'm not one of the Facebook Developer, but I need some data for my thesis, regarding one group in Facebook which I'm currently observing.
The problem is, I must collect the data within the last 6 months of:
how many members have joined in the last 6 months, if possible, can be split by monthly.
how many postings in the group in the last 6 months, also.. if possible split by monthly
how many active users within the last 6 months.
Can somebody give me some hints of how to collect those information?
You're going to have a hard time doing this. Groups aren't very API friendly, and they don't have their own insights information.
You can try browsing the group's feed using the Graph API Explorer using the /GROUP_NAME_OR_ID/feed edge, and adding since and until filters to look at monthly data.
However, you won't see all the posts because of Facebook privacy filtering. To get the most reliable data, you'll need to manually count the entries of interest from within the Facebook webapp.

Facebook Graph API Data Incorrect

Small problem here. I have an event created on Facebook and am using the Graph API to get the number of attendees.
I get the list of attendees with PHP from https://graph.facebook.com/EVENTID/attending?access_token=TOKENHERE and it returns a list of names.
However, the number of attendees is about 6 people lower than what is shown on the Facebook event page. Why would these numbers not match? Is there something in particular I'm supposed to do in the code to get the entire list?
As answered in the comments:
This discrepancy is probably down to a number of the attendees having opted out of Facebook Platform, which means their data isn't passed to apps via the API. Can't be 100% sure without the Event ID, but its a likely reason. – Simon Cross
From the Graph API, the people who have not joined the event will not show up under /{eventid}/attending, you need to add in the users who are returned in /{eventid}/not_replied. The not_replied set seems to be a special set in the GraphAPI.. and if you look at the docs, there is a mention of only people who have joined the event.