duanchen9594 2011-09-28 06:24
浏览 41
已采纳

$ facebook-> api()总是失败并抛出名称查找超时异常

I m creating FB application using new graph api(iframe). Application works fine but when I call api method it throws exception. Say call to

$permissions = $facebook->api("/me/permissions");
OR
$fbme     =   $facebook->api('/me');

always fails and throws "Name lookup timeout" exception. So I browse for this problem and found one solution that is changing facebook.php file in that set CURLOPT_CONNECTTIMEOUT from default 10 to higher value. But this solution doesn't work for me and I m getting same problem. Why this is happening. Is there any solution for this problem or any alternate method for api() on serverside.

Thanks in advance..

  • 写回答

1条回答 默认 最新

  • dongxianrang9269 2011-09-28 13:57
    关注

    Are you sure you are using the new graph API?

    You might try replacing "api-read.facebook.com" with "api.facebook.com" in the library you downloaded from facebook. (I think it's name is facebook.php)

    And sometimes the Facebook server is not running 100%, you can check that here: http://api-status.com/6404/50042/Facebook-Graph-API

    Also you should check your config, maybe you didn't set the correct App Id or Secret key.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 php 将rtmp协议转hls协议,无法播放
  • ¥15 miniconda安装不了
  • ¥20 python代码编写
  • ¥20 使用MPI广播数据遇到阻塞
  • ¥15 TinyMCE如何去掉自动弹出的“链接…”工具?
  • ¥15 微信支付转账凭证,如何解决
  • ¥15 在win10下使用指纹登录时,界面上的文字最后一个字产生换行现象
  • ¥20 使用AT89C51微控制器和MAX7219驱动器来实现0到99秒的秒表计数,有开始和暂停以及复位功能,下面有仿真图,请根据仿真图来设计c语言程序
  • ¥15 51单片机 双路ad同步采样
  • ¥15 使用xdocreport 生成word