开发者

Unable to retrieve "me" profile information in Facebook via PHP

开发者 https://www.devze.com 2023-01-16 11:35 出处:网络
I am trying to get some profile information in my Facebook via PHP as specified in, http://developers.facebook.com/docs/authentication/

I am trying to get some profile information in my Facebook via PHP as specified in,

http://developers.facebook.com/docs/authentication/

$user = json_decode(file_get_contents(
'https://graph.facebook.com/me?access_token=' .
$cookie['access_token']))->me;

When I run this code, I am getting the following warning:

Warning: file_get_contents(.....) [function.file-get-contents]: failed to open stream: No such file or directory in /home/website/public_html/helloworldpp/index.php on line 30

I have truncated an开发者_StackOverflowd add "....." instead of the actual URL. However, when I access the "....." url via the browser I am getting the json response. I am not sure why I am unable to get it via the php code. Could some one please help me out?

Thanks a bunch.


It's possible that opening websites with file open is disabled on your webserver. You might want to consider using Curl instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消