Facebook insights API goes only week back - facebook

I am trying to do some advanced analytics over my FB page, but recently I have encountered a problem. When I try to get some data (lets say "page_views_by_referers_logged_in_unique") I am not able to request for longer period than one week. Api says that valid values for period field are day, week, days_28, month, lifetime, total_over_rangebut for period longer than week it returns only empty array. Can someone tell me what is the problem here? Page is like 2 years old, so I am sure there is enough data for longer periods.

Related

How do I get the number of hours in a period via API for Project Online

I am trying to pull the number of hours in a period, per the calendar and not the actual time logged in the timesheet.
I have not been able to find it in any of the api endpoints. For a week that has a single holiday, per the enterprise calendar, I would expect to see 32 hours. For weeks that don't have holidays, I would expect to see 40.

Paypal Sync Api last_refreshed_datetime - what does it mean, how often it refreshes?

Paypal documentation for PayPal Sync API (https://developer.paypal.com/docs/api/sync/v1/).
It gives some mysterious date, named "last_refreshed_datetime".
On the sandbox server it is usually in the past, once it was a few days in the past, now it is 2 hours in the past.
What does it mean? How often it refreshes?
I only know that if I create a transaction it will not be visible on PayPal Sync API until the refresh date will not be later than the transaction date. And I'm guessing it should be the transaction approval date that does not presented on this report. The transaction approval date is available on transaction object (https://developer.paypal.com/docs/api/subscriptions/v1/#definition-transaction), it is called "time".
time string
The date and time when the transaction was processed, in Internet date and time format.
Read only.
I have reached out to the product development team for the SYNC API and have gotten the following clarifications in regards to your questions:
If the "last_refreshed_datetime" (Time until which we have data available in our system) is smaller than the requested end date then, in the API response we show end date as "last_refreshed_datetime". As we only have data up until that point. In general there should be around 4-6hrs of delay.
From my own experience on sandbox, on different occasions it was 6.5, 2.5 hours and even 2 days behind.

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.

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.