【发布时间】:2013-01-22 18:55:40
【问题描述】:
我需要您的帮助来解决问题。 在我获得令牌后的某个时间,当尝试获取有关用户的数据时会发生此错误:
A PHP Error was encountered
Severity: Warning
Message: file_get_contents(https://graph.facebook.com/me?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
执行这个的代码是:
$url = "https://graph.facebook.com/me?access_token=".$token;
$dados = @json_decode(file_get_contents($url));
我该如何解决这个问题?为什么会这样?
我搜索了很多,但没有找到解决方案。请有人帮帮我。
谢谢。
【问题讨论】:
-
将您的访问令牌粘贴到debugger。它是否有效并且是 user 访问令牌?
标签: facebook-graph-api graph sdk facebook-opengraph token