In looking at the stream table, the documentation says ..
updated_time time
The time the post was last updated, which occurs when a user comments on the post, expressed as a Unix timestamp
created_time time
The time the post was published, expressed as a Unix timestamp
However, when I execute a FQL query against the table I see
<created_time>1328136721</created_time>
<updated_time>1328136721</updated_time>
even though 700+ comments have been made on the post. Given the documentation, if a comment has been made on a post, I don't see how the 2 timestamps can ever be the same.
The bug seems the appear for status with 30+ comments, as per this bug report. It is currently marked "Assigned".
Related
I hope this isn't just a friday brainfart, but here are more details:
I have an article model that only shows to the public when each article is marked as "published" and saved. However, the only timestamp is on create or update, so if someone creates an article on Monday, but publishes Friday, it will still show up as created Monday (thus not at the top of the feed).
Can provide code if needed, but if anyone has a quick thought that would be great. Please ask what code you need to see. Thanks!
I would convert the boolean column published to timestamp.
Set it to now() when published, leave it NULL until published.
If publishing the article was the last update you can sort by the updated_at column.
When I call the /statuses endpoint I only get a updated_time field and not a created_time field (like I do when calling /photos or /links). It seems that updated_time is the time this post was last liked or commented, and it appears even setting the since parameter in the query returns statuses that were created before since but were updated after.
Is there any reason for this difference between /statuses vs. /photos and /links?
Can I get a created_time for a status and query since accordingly?
Better use FQL for this time. It has always been more complete than Graph.
SELECT time, message FROM status WHERE uid = me()
time uid
UNIX timestamp of the date and time the status message was posted
https://developers.facebook.com/docs/reference/fql/status/
I have this query:
SELECT metric,value FROM insights WHERE object_id=200829446624786 AND
metric IN("page_story_adds_unique","page_impressions_unique",
"page_impressions_organic_unique","page_impressions_paid_unique",
"page_impressions_viral_unique") AND (end_time=end_time_date('2013-03-06')) AND
period=period("days_28")
but for some reason the query returns an empty array. I changed the date to last month (2013-02-06) and it returned an array with values for the metrics I asked for.
Can anyone please explain why there were no values when I put in the current month while putting in previous months gives me sufficient values? Thanks :)
Want to improve this post? Add citations from reputable sources by editing the post. Posts with unsourced content may be edited or deleted.
Because the most recent data is always a couple of days old. On my page it is 4 days old.
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.
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.