function _facebook_wall_graph_api_content in Facebook Wall 7
Generate object array of FB Graph API content via CURL request.
Parameters
string $url: FB graph api url with access token and fields.
Return value
array Object array containing FB data.
1 call to _facebook_wall_graph_api_content()
- _facebook_wall_error_msg in ./
facebook_wall.module - Generate error message and fetchs FB content.
File
- ./
facebook_wall.module, line 230 - Get the current facebook wall posts of the given user or page.
Code
function _facebook_wall_graph_api_content($url) {
$response = drupal_http_request($url);
if ($response->code == 200) {
return json_decode($response->data);
}
elseif (isset($response->data, $response->data->error, $response->data->error->message)) {
watchdog('facebook wall', $response->data->error->message, array(), WATCHDOG_ERROR);
}
else {
watchdog('facebook wall', '<pre>' . print_r($response, TRUE) . '</pre>', array(), WATCHDOG_ERROR);
}
}