未捕获的异常:1:Facebook API 中发生未知错误,FQL 错误

发布于 2024-12-23 04:02:56 字数 512 浏览 3 评论 0原文

当我尝试执行 FQL 来捕获朋友签到中的所有照片时,我得到了来自 Facebook API 的未知错误。

这是我的代码:

$photo_params = array('method' => 'fql.query','query' => "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))",);
//Run query

$result_photo = $fbapi->api($photo_params);

然后我将处理附件数据以获取照片的 URL。

我该如何解决这个问题?

When I try to do an FQL to catch all the photos in a friend's checkins, I'm getting an unknown error from the Facebook API.

Here's my code:

$photo_params = array('method' => 'fql.query','query' => "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))",);
//Run query

$result_photo = $fbapi->api($photo_params);

I'll handle the attachment data to get the photo's URL then.

How do I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜吻♂芭芘 2024-12-30 04:02:56

您以错误的方式使用Graph API。通过 Graph API 执行 FQL 查询的新方法是:

$query = "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))";
$result_photo = $fbapi->api('/fql', 'GET', array('q'=>$query));

You're using Graph API in a wrong way. The new way of doing FQL queries via Graph API is:

$query = "SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))";
$result_photo = $fbapi->api('/fql', 'GET', array('q'=>$query));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文