如何获取评论发布时间
我正在尝试使用 facebook api 从用户的新闻源中获取最后的帖子以及附加的评论。通过对 STREAM 表的查询,可以轻松获取有关这些评论的信息,例如文本、演员 ID 等,
var query = FB.Data.query('SELECT post_id, actor_id, app_data, message, attribution,创建时间,评论来自流 WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid={0} AND type="newsfeed") LIMIT 20',响应.id);
但它似乎不包括发布这些评论的时间戳(因此我可以使用“created_time”获取帖子本身的时间戳,但不能获取附加的评论的时间戳)。 有人知道如何做到这一点吗? 非常感谢您的帮助。 多谢。
I'm trying use the facebook api to get the last posts from the newsfeed of a user along with the comments attached to it. It's easy to get information about those comments such as the text, the actor id, etc... from a query to the STREAM table,
var query = FB.Data.query('SELECT post_id, actor_id, app_data, message, attribution, created_time, comments FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid={0} AND type="newsfeed") LIMIT 20', response.id);
but it doesn't seem to include the timestamp at which those comments were posted (so I can get the timestamp for the post itself with 'created_time', but not for the comments attached to it).
Does anybody know a way to do this?
Help would be much appreciated.
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是对表
stream
的查询响应示例您可以获取 希望这会有所
帮助。
免责声明:尚未调试 JavaScript。可能存在拼写错误。
This is a sample response from a query to the table
stream
You could fetch that with something like
Hope this helps.
Disclaimer: Have not debugged the JavaScript. typos may be present.
In:
有评论创建时间的unix时间戳。
In:
there is the unix timestamp from the comment created time.