Facebook 在 php sdk 中显示致命错误

发布于 2024-12-12 02:21:29 字数 717 浏览 0 评论 0原文

以下错误是什么意思?为什么我会收到此错误。

致命错误:未捕获异常:601:解析器错误:查询意外结束。在第 1039 行的 base_facebook.php 中抛出

我正在使用代码在用户从应用程序选项卡中单击邀请后删除邀请,但这并没有删除应用程序请求

这是代码,

   foreach ($request_ids as $request_id)
    {
     echo ("reqeust_id=".$request_id."<br>");
    $full_request_id = build_full_request_id($request_id, $user_id);  
     echo ("full_request_id=".$full_request_id."<br>");

  try {
     $delete_success = $facebook->api("/$full_request_id",'DELETE');
     if ($delete_success) {
        echo "Successfully deleted " . $full_request_id;}
     else {
       echo "Delete failed".$full_request_id;}
    }          
  catch (FacebookApiException $e) {
  echo "error";}
}

What is meant by the below error?Why am i getting this.

Fatal error: Uncaught Exception: 601: Parser error: unexpected end of query. thrown in base_facebook.php on line 1039

I'm using a code to delete the invite once the user clicks on it from app tab,but this is not deleting the app request

Here is the code,

   foreach ($request_ids as $request_id)
    {
     echo ("reqeust_id=".$request_id."<br>");
    $full_request_id = build_full_request_id($request_id, $user_id);  
     echo ("full_request_id=".$full_request_id."<br>");

  try {
     $delete_success = $facebook->api("/$full_request_id",'DELETE');
     if ($delete_success) {
        echo "Successfully deleted " . $full_request_id;}
     else {
       echo "Delete failed".$full_request_id;}
    }          
  catch (FacebookApiException $e) {
  echo "error";}
}

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

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

发布评论

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

评论(1

一生独一 2024-12-19 02:21:29

为什么这个位要加引号?

$facebook->api("/$full_request_id",'DELETE');

当然应该是:

$facebook->api($full_request_id,'DELETE');

除此之外,我认为你的代码没有任何问题。不过,最好知道 base_facebook.php 中的第 1039 行是什么。

Why is this bit in quotes?

$facebook->api("/$full_request_id",'DELETE');

Surely it should just be:

$facebook->api($full_request_id,'DELETE');

Other than that I see nothing wrong with your code. Although, it would be good to know what line 1039 in base_facebook.php is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文