CurlUrlInvalidException :Facebook 实时更新
我正在尝试实现 Facebook 实时更新。看来我可以订阅了。
`$param = array(
'access_token' => $user_access_token,
'object' => 'user',
'fields' => 'name',
'callback_url' =>'http://127.0.0.1/storm/callback.php',
'verify_token' => 'XYZ',
'active' => true
);
$subs = $facebook->api('/'.$app_id.'/subscriptions', 'POST', $param);
`
我收到此错误:
{"message":"http:\/\/127.0.0.1\/storm\/callback.php?hub.mode=subscribe&hub.challenge=1229793076&hub.verify_token=XYZ是一个内部 url,但这是一个外部请求。","type":"CurlUrlInvalidException"}}
这样做跟我本地测试有什么关系吗? 我该如何解决这个问题?请告诉我。
I was trying to implementing facebook real time update. It looks like i was able to subscribe.
`$param = array(
'access_token' => $user_access_token,
'object' => 'user',
'fields' => 'name',
'callback_url' =>'http://127.0.0.1/storm/callback.php',
'verify_token' => 'XYZ',
'active' => true
);
$subs = $facebook->api('/'.$app_id.'/subscriptions', 'POST', $param);
`
I get this error:
{"message":"http:\/\/127.0.0.1\/storm\/callback.php?hub.mode=subscribe&hub.challenge=1229793076&hub.verify_token=XYZ is an internal url, but this is an external request.","type":"CurlUrlInvalidException"}}
Does this have anything to do with me testing it locally??
How can i fix this? Please let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在“callback_url”中使用您的真实IP地址
You need to use your real ip address in 'callback_url'