I am trying to use the graph api with limit and since
I think the highest limit is 5000, so I am using that ( I want to make the fewest calls).
I am also trying to look 1 month back.
So I try:
https://graph.facebook.com/[ID of page]/feed&access_token=[accesstoken]&limit=5000&since=11-12-24
and I get 207 results, and the earliest date is december 24th, this is all fine, its saying hey there are only 207 results in the last month. The problem is there is a next link that has:
"next": "https://graph.facebook.com/[id of page]/feed?limit=5000&until=1324702511"
If I get this page, I start getting posts beore december 24th.
So my question is, how can I be sure I get all posts after a given date with fewest calls???
The kludge I am thinking of is to set the since on the first call to 1 day before, then if I get a post with that date, I know I got them all, if not I paginate... 5000 posts in one month is a lot, but I think its possible...
It seems like facebook should provide a way to get since with highest limit possible...I read this http://developers.facebook.com/blog/post/478/ but im still confused.
Related
I am on design number three I think now of a program that submits a series of stock tickers and metrics to Yahoo Finance. I don't need to go into too much total about what it does as I have got most of it up and running now apart from one remaining issue.
The Yahoo Finance site lists about 2700 stock tickers on the NASDAQ alone. I anticipated that submitting all of these in one filename URL statement might fall over for some reason, so set an initial string length of 500 tickers and built some nested macros to iterate through in 500 ticker blocks until everything I wanted had been extracted.
However during development of the code it seems that if I build a string with any more than about 200 tickers in I get an error telling me that SSL Support cannot be run and the code falls over.
Does anyone have any idea why this is? In ideal world I would like to be able to do this code in one pass where all 2700 stock tickers are pulled down. If this isn't possible if someone could explain why not that would be great.
Thanks
I'm trying to build a tool that collects a few data points from a user usage report with
https://www.googleapis.com/admin/reports/v1/usage/{user}/all/dates/{yyyy-mm-dd}
Since the data is delayed - how do I get the most recent report? If I were to query today's (2013-11-22) date I would get something like:
Data for dates later than 2013-11-19 is not yet available. Please check back later
Is there a set number of days/hours for reports to be available - or do I have to trial and error backwards until I get a successful response?
I believe there is a delay of about 48 hours for the reports as of right now. However, if Google is able to improve on that, you'll want your app to be able to take advantage of those improvements without any changes needed.
I suggest you make a first attempt using today's date. When that fails, parse the error response to grab the last date report data is available for and use that value. This way you're always making only 2 max attempts and if Google improves the delay to 24 hours or even less, your app is able to take immediate advantage of that change.
I am looking for a solution which I can get that last 50 comments to the page's wall, or all comments in an hour to the page's wall and posts date wont matter, could be posted 2 years before but If gets a comment in an hour I need to get it. I don't want to get all posts and look one by one.
thank you for your effort
The first one is easy. Issue an API call to this endpoint:
/PAGE_NAME_OR_ID/feed?fields=comments.limit(50)
You will be restricted to the normal limits of feed, so the comments returned here will only be those made on the last 30 days or 50 posts, whichever is fewer.
If you want the last 50 comments, you'll need to use FQL.
SELECT time, text, text_tags, post_id FROM comment WHERE post_id IN
(SELECT post_id FROM stream WHERE source_id IN
(SELECT id FROM profile WHERE username="cocacola") LIMIT 100)
ORDER BY time DESC LIMIT 50
Keep in mind that Facebook's filtering algorithms operate after FQL. You may need to increase the LIMIT values substantially to be guaranteed get 50 results.
From the last few days, Facebook insights API is giving Fan count as 0 for certain dates and when queried for Fan count for the same dates after few days, insights API is giving the count. Is there a bug with insights API for this abnormal behaviour?
Insights API used to work without any issues so far and from the past 15 days or so I have noticed this abnormal behavior.
Please help regarding this if any one has any idea about this abnormal behavior.
Thank you,
Raghu
I have also this bug too, additionally for the other metrics deprecated as said in FB. Two days before I could get page_fans for January 3-5,2012 but after 10 minutes of that it was gone !
Also I noticed that in the queries in FB.api we wrote, end_time has to be written like a UNIX time ie 12423492349 not like 2011-01-03 in this function. I think this end_time function becomes a bug for the API and now there is no of that.
After hours of searching the web (including SO), I am requesting advice from the community. RRD seems to be the right tool for this, but I could not get a straight answer until now.
My question is : Is it possible to get RRD output a graph for the day, that averages data from the past year ?
In other words, I want the "view span" to be one day long, but the "data span" to extend over the last 12 months, so that for 6pm, the value will be computed as the average value of ALL previous traffic measured at 6pm last 12 months.
Any hints, or instructions welcomed!
There is no direct way to create such a graph, at least in theory it would be possible using multiple DEF lines together with the SHIFT operation to create such a chart ... you would have to use a program to create the necessary command line though