【发布时间】:2013-04-03 08:55:16
【问题描述】:
file_get_contents('https://graph.facebook.com/me/accounts?access_token=ACCESS_TOKEN_HERE');
当我使用访问令牌在浏览器中打开此链接时,它会列出我所有的 Facebook 页面,当我尝试使用 file_get_contents 回显它时,会出现以下错误:
警告: file_get_contents(https://graph.facebook.com/me/accounts?access_token=ACCESS_TOKEN_HERE) [function.file-get-contents]:无法打开流:权限被拒绝 在 /home/www/*********** strong>.php 第 4 行
file_get_contents 也适用于任何其他网站。
【问题讨论】:
-
你能在不同的 https url 上
file_get_contents吗? -
HTTPS 请求出现permission denied 错误?这很奇怪,权限错误通常发生在本地文件系统中,而使用 HTTP(S) 时则不会。我宁愿期待一个 HTTP 错误代码。
-
Eldar 我检查了它。我也无法在任何其他 URL 上获取 file_get_contents。
标签: php facebook facebook-graph-api facebook-php-sdk