Facebook Graph Feed documentation - facebook

Where can I find the documentation (parameters that can be given) of the following graph url:
https://graph.facebook.com/<PAGENAME>/feed
I've been searching for hours, but I can't find them.. I'm looking for the parameter to get posts till a certain date..

What you are looking for is Time-based Pagination to navigate through results data using Unix timestamps which point to specific times in a list of data. You can use the until field which as per documentation is
A Unix timestamp or strtotime data value that points to the end of the range of time-based data.
For example, following will give you the posts of User until 10th June 2013
me/feed?until=1370840400

Related

Can I get AuthorRetrieval data since a specific year?

I tried to use this format but it returns data from all the years:
AuthorRetrieval(author_id, refresh=True, kwds='PUBYEAR IS 2022 OR PUBYEAR IS 2021 OR PUBYEAR IS 2020 OR PUBYEAR IS 2019 OR PUBYEAR IS 2018')
To be more specific to my problem, I am trying to get the number of documents that have cited(cited by) excluding the self-cited documents of the past five years.
For the citations I used the parameters start, end(CitationOverview), but I cant find something for the number of cited-by.
That is unfortunately not possible. The Author Retrieval API returns only the current state - just as if you were looking at an Author profile on scopus.com.
The reason why your kwds parameter is ignored is because it's not a valid keyword. It's not made for a Scopus query string. See https://www.programiz.com/python-programming/args-and-kwargs for an overview of what the parameter does.
Your only option is to reconstruct author values from her publications. You can get them with the ScopusSearch() class.
I'd recommend to use a query like "AU-ID(123466)" and then extract the documents based on their publication year. This way it's much more likely that you can re-use the cached results.

Facebook Marketing API Between Relative Dates

I know I can retrieve data from the API between two specified dates like so:
https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=2016-04-01&time_range[until]=2016-04-16
Is there a way to retrieve the data from the API using relative dates from today? Such as this psuedocode:
https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=15 DAYS AGO&time_range[until]=7 DAYS AGO
Yes and no.
We do support a list of date presets
And they are defined in:
https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/
Or you can check our php SDK:
https://github.com/facebook/facebook-php-ads-sdk/blob/613d89fbe0424d017a5156658b4e324fbfb5be68/src/FacebookAds/Object/Values/AdsInsightsDatePresetValues.php
https://github.com/facebook/facebook-php-ads-sdk/blob/d51193b19d730ae9274d45540986e1ac311b074d/src/FacebookAds/Object/AdsInsights.php#L72
In curl you will just use date_preset parameter instead of since

How to retrieve only the newest rows via the Smartsheet API

I need to be able to retrieve only the newest (most recently modified) rows via the Smartsheet API.
The only way to get a sheet's rows seems to be via the Get Sheet call here: http://www.smartsheet.com/developers/api-documentation#h.4930jur8qsvs
I have a large sheet that is taking this call over 30 seconds to return. What I really need is just a way to get the most recently modified rows since a given timestamp.
Is there a way?
Try this (REST GET operation):
/sheet/{sheetID}?rowsModifiedSince={DATETIME}
DATETIME: Must be in UTC Format. e.x.:
https://api.smartsheet.com/1.1/sheet/##########?rowsModifiedSince=2015-03-26T11:40:00Z
This is an undocumented parameter of Smartsheet API 1.1.
Grabbing rows by modified date is not currently supported by the Smartsheet API at this time.
Just to provide an update of a hard to find correct syntax for version 2.0:
ten_ago = datetime.now() - timedelta(minutes=10)
ten_ago = ten_ago.isoformat()
page = smart.Sheets.get_sheet(sheet, level=2, rows_modified_since=ten_ago, include=object_value)
This will retrieve only the rows that has been modified 10 min ago including smartsheet object values.

Facebook get wall by time limit

I am getting wall posts by facebook sdk
$get = $facebook->api('/me/posts', 'GET' );
or
$get = $facebook->api('/me/feed', 'GET' );
I need to save them into my own DB, and after new request, I need get posts, that I have not saved yet. But I could not find any parameters to add to get info for example last 7 days, or after post by timestamp smth.
I saw that there is FQL which has time field, but it was only in Statuses table, I need all of them, likes, shares, statuses, comments etc.
Can anyone help me?
You can add since=[time] and/or until=[time] as query strings to get a specific slice of time.
For instance, to get 7 days of posts beginning on October 1, 2012, try this:
'/me/feed?since=2012-10-01&until=2012-10-08'
Your time string can be either an ISO-8601 date string or a UNIX timestamp.

Formatting dates with FQL

I'm trying to do the following Facebook Query Language query:
https://api.facebook.com/method/fql.query?query=SELECT name FROM user WHERE uid IN (SELECT actor_id FROM stream WHERE app_id = 131580206909839 AND xid = 'daily_thred_production' AND created_time > 2011-03-06 AND created_time < 2011-03-08)
The problem is that the dates aren't being recognized and I can't find any documentation on how to format FQL dates from the Facebook developer section. Any thoughts?
EDIT
I'm doing all of this from the URL with no programming language. I'm just trying to pull one-off statistics for some co-workers.
Epoch time seems to work, thanks! Only problem is that it's only displaying new users that contributed to the stream for the first time. Unfortunately I'm trying to find everyone in the stream, I'll have to look at the stream table more carefully.
Thanks Brian.
They're epoch time (Number of seconds since 00:00:00 Jan 1, 1970 UTC)
You need to convert your dates to epoch time in whatever language you're using.
EDIT: If you need an example, let me know what programming lang you're using.