How can I get the number of FB shares/likes for some FB object over a time period?
For example, I'd like to get how many shares where for some url from January, 1st, 2011 until January, 30th, 2011.
There is the link_stat table:
http://developers.facebook.com/docs/reference/fql/link_stat/
but I don`t think there is any timestamp there, or anywhere in the facebook database.
What you can do is query this table and save the stats in your DB at the beginning and end of the period, and compare the values.
Related
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
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.
There is Event on Facebook. I'm using FQL to retrieve information and results are different for different access tokens.
Select query
select eid, name, start_time, end_time, update_time, timezone, from event where eid in (321074447988833)
1)access token was generated:
https://graph.facebook.com/fql?q=select%20eid,%20name,%20pic_big,%20description,%20privacy,%20start_time,%20end_time,%20update_time,%20timezone,%20location,%20venue%20from%20event%20where%20eid%20in%20(321074447988833)&access_token=XXXXX
result:
"start_time": "2012-09-12",
"end_time": null,
2) Real user access token:
result:
"start_time": 1347440400,
"end_time": 1347526800,
Why on the first example we don't have "end_time" (it's right) but on the second we have it and the difference between start_time and end_time is one day. So it looks like event takes 2 days accept of one.
The Graph API Facebook application must have the Events Timezone Migration enabled.
The current method is to return a UNIX timestamp of the event's time as though it takes place in Pacific Time converted to GMT.
With the migration enabled, Facebook now returns an ISO-8601 formatted date string with time and timezone.
The migration is currently scheduled to be rolled out to all apps in December.
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.
What is the valid format for start_time and end_time while adding an event using graph api ...
i tried adding an event using unix time stamp .. however its not showing the same date when the event is published ..
when i give start_time as 1293802200 which is 31st Dec 2010 07:00 pm .. it shows as 31st Dec 5:30am on facebook ..
what is it that am doing wrong .. do i need to consider time zone issues as well ??
Regards
Abhishek Jain
According to http://developers.facebook.com/docs/reference/api/event/ it seems that you need to specify date in the Pacific time zone (PST).
Now, the timestamp value you provided is 31st Dec 2010 19:00 in India indeed which corresponds to same day, 5:30 in Pacific time.
In conclusion, convert your local time to Pacific time (PST) prior to uploading it to Facebook.