View Full Version : http_Get not working / Facebook feed

04-11-2012, 01:37 PM
Hey everyone,

I'm just starting to play around with the Facebook Graph API and have very quickly run into a problem.

As far as I understand it, I need to retrieve the data from said FB page using something like the following:

$feed = http_get("https://graph.facebook.com/PAGENAME?access_token=ACCESSTOKEN");

However, if I run that I simply get:

Fatal error: Call to undefined function: curl() in...

I've checked and PECL is enabled as I've heard this error can be caused by that being false.

Any ideas? Thanks

04-11-2012, 02:50 PM
Ok, with help from a friend I managed to get what I needed using curl:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS-TOKEN");
curl_setopt($ch, CURLOPT_HEADER, 0);