Facebook CurlException 3未设置URL [英] Facebook CurlException 3 No URL set

查看:92
本文介绍了Facebook CurlException 3未设置URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了

FacebookApiException对象 (

FacebookApiException Object (

[结果:受保护] =>数组

[result:protected] => Array

( [错误代码] => 3 [错误] =>数组 ( [消息] =>未设置URL! [类型] => CurlException )

( [error_code] => 3 [error] => Array ( [message] => No URL set! [type] => CurlException )

    )

[message:protected] => No URL set!
[string:private] => 
[code:protected] => 3
[file:protected] => /home5/theteci0/public_html/team/fb6/base_facebook.php
[line:protected] => 979
[trace:private] => Array
    (
        [0] => Array
            (
                [file] => /home5/theteci0/public_html/team/fb6/base_facebook.php
                [line] => 911
                [function] => makeRequest
                [class] => BaseFacebook
                [type] => ->
                [args] => Array
                    (
                        [0] => https://graph.facebook.com/172535322883581_253291878141258
                        [1] => Array
                            (
                                [fields] => updated_time
                                [method] => GET
                                [access_token] => /*Acc_tkn*/
                            )

                    )

            )

        [1] => Array
            (
                [file] => /home5/theteci0/public_html/team/fb6/base_facebook.php
                [line] => 878
                [function] => _oauthRequest
                [class] => BaseFacebook
                [type] => ->
                [args] => Array
                    (
                        [0] => https://graph.facebook.com/172535322883581_253291878141258
                        [1] => Array
                            (
                                [fields] => updated_time
                                [method] => GET
                            )

                    )

            )

        [2] => Array
            (
                [file] => /home5/theteci0/public_html/team/fb6/base_facebook.php
                [line] => 656
                [function] => _graph
                [class] => BaseFacebook
                [type] => ->
                [args] => Array
                    (
                        [0] => /172535322883581_253291878141258
                        [1] => GET
                        [2] => Array
                            (
                                [fields] => updated_time
                            )

                    )

            )

        [3] => Array
            (
                [file] => /home5/theteci0/public_html/team/user/comments.php
                [line] => 71
                [function] => api
                [class] => BaseFacebook
                [type] => ->
                [args] => Array
                    (
                        [0] => Array
                            (
                                [0] => Facebook Object
                                    (
                                        [appId:protected] => 
                                        [appSecret:protected] => 
                                        [user:protected] => 
                                        [signedRequest:protected] => 
                                        [state:protected] => 
                                        [accessToken:protected] => /*Acc_tkn*/
                                        [fileUploadSupport:protected] => 
                                        [trustForwarded:protected] => 
                                    )

                                [1] => _graph
                            )

                        [1] => Array
                            (
                                [0] => /172535322883581_253291878141258
                                [1] => GET
                                [2] => Array
                                    (
                                        [fields] => updated_time
                                    )

                            )

                    )

            )

    )

)

我经常收到此错误,如何预防或解决?

I am getting this error a Lot, how to prevent it or solve it?

推荐答案

由于IPV6出现问题,您应该在Facebook api中添加以下行.

by problems with IPV6 you should have included the following line in your facebook api.

Facebook::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;

但是此替代方法仅适用于php最大的5.3版本和Curl版本> 7.10.8

however this alternative only works with version 5.3 of php largest and Curl version > 7.10.8

解决方案:

if((phpversion()>= 5.3)){ Facebook::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; }

这篇关于Facebook CurlException 3未设置URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆