doujiang3997 2014-02-16 23:32
浏览 111

ErrorCurlException:7:无法连接到255.255.255.255:网络无法访问

I am getting this error in my PHP code:

ErrorCurlException: 7: Failed to connect to 255.255.255.255: Network is unreachable

Here is my code:

require_once 'src/facebook.php'; //include the facebook php sdk
$facebook = new Facebook(array(
    'appId'  => '*************',    //app id
    'secret' => '**********************', // app secret
));

$user = $facebook->getUser();

if ($user) { // check if current user is authenticated
    try {
        // Proceed knowing you have a logged in user who's authenticated.

        $user_profile = $facebook->api('/me');  //get current user's profile information using open graph
        $email = $user_profile['email'];
        echo"<script>alert(\"$name\");</script>";
    } catch(Exception $e)    {
        $name="Error".$e;
    }
}
echo"<script>alert(\"$name\");</script>";
?>

The same code is working on a different page. I am just a beginner and don't know much about FB API.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?