Php Facebook例外3未设置URL
我越来越Php Facebook例外3未设置URL,php,facebook-graph-api,curl,facebook-php-sdk,Php,Facebook Graph Api,Curl,Facebook Php Sdk,我越来越 ) [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]
)
[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
)
)
)
)
)
)
FacebookApiException对象
(
)
[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
)
)
)
)
)
)
[结果:受保护]=>阵列
)
[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
)
)
)
)
)
)
(
[错误代码]=>3
[错误]=>数组
(
[消息]=>未设置URL!
[类型]=>卷发异常
)
)
[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
)
)
)
)
)
)
我经常遇到这个错误,如何防止或解决它?由于IPV6的问题,您应该在您的facebook api中包含以下内容
)
[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
)
)
)
)
)
)
Facebook::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
但是,此替代方案仅适用于php版本5.3和Curl版本>7.10.8
)
[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
)
)
)
)
)
)
解决方案:
)
[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
)
)
)
)
)
)
if((phpversion()>= 5.3)){ Facebook::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; }