我有一个进程定期为给定用户抓取流表,导入任何新评论或帖子。当我使用 facebooks fql.query 链接测试我的查询时,会列出正确的结果。例如:
SELECT post_id、app_id、actor_id、created_time、updated_time、消息、评论、app_data、喜欢、附件、永久链接 FROM 流 WHERE source_id = "652904096" ORDER BY Updated_time DESC LIMIT 0, 20
https://api.facebook.com/method/fql.query?query=SELECT%20post_id,%20app_id,%20actor_id,%20created_time,%20updated_time,%20message,%20comments,%20app_data,% 20 个赞,%20 个附件, %20permalink%20FROM%20stream%20WHERE%20source_id=652904096%20ORDER%20BY%20updated_time%20DESC%20LIMIT%200,%2020&access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
第一个结果来自今天早些时候。
但是,当我使用我的应用程序和 php sdk,使用相同的查询和访问令牌时,第一个结果来自 12 月 23 日
以下是我从我的应用程序调用查询的方式
$result = $fb->api(array(
"method"=>"fql.query",
"query"=>$query,
"access_token"=>$oauth_token
));
有谁知道为什么会发生这种情况?我已向 PHP SDK 添加了调试语句,以确认查询和访问令牌相同。
I have a process which scrapes the stream table periodically for given users, importing any new comments or posts which have come in. When I test my query using the facebooks fql.query link, the correct results are listed. For example:
SELECT post_id, app_id, actor_id, created_time, updated_time, message, comments, app_data, likes, attachment, permalink FROM stream WHERE source_id = "652904096" ORDER BY updated_time DESC LIMIT 0, 20
https://api.facebook.com/method/fql.query?query=SELECT%20post_id,%20app_id,%20actor_id,%20created_time,%20updated_time,%20message,%20comments,%20app_data,%20likes,%20attachment,%20permalink%20FROM%20stream%20WHERE%20source_id=652904096%20ORDER%20BY%20updated_time%20DESC%20LIMIT%200,%2020&access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The first result is from earlier today.
But when I use my app and the php sdk, with the same query and access token, the first result is from December 23rd
Here is how I am calling the query from my App
$result = $fb->api(array(
"method"=>"fql.query",
"query"=>$query,
"access_token"=>$oauth_token
));
Does anyone have any idea why this could be occurring? I have added debug statements to the PHP SDK to confirm that the query and access tokens are the same.
发布评论
评论(1)
如果查询 &访问令牌是相同的,您正在使用的 API 中发生了一些缓存。您尝试过使用 Javascript SDK 吗?您可以在 https://developers.facebook.com/tools/console/。
If both the query & the access tokens are the same, there's some caching happening in the API you're using. Have you tried using the Javascript SDK? You can give it a quick test at https://developers.facebook.com/tools/console/.