function _facebook_album_fetch_api_response in Facebook Album 7.2
Same name and namespace in other branches
- 7.3 facebook_album.module \_facebook_album_fetch_api_response()
Make a curl request to the specified url and return a converted response
Parameters
$url: The url to make a request to
Return value
mixed A response rendered as an array
5 calls to _facebook_album_fetch_api_response()
- facebook_album_ajax_get_albums_next in ./
facebook_album.module - Fetch the next or previous set of cover photos from the specified page ID
- facebook_album_ajax_get_album_cover in ./
facebook_album.module - Fetch an individual album cover
- facebook_album_ajax_get_album_next in ./
facebook_album.module - Fetch the next or previous set of photos from the specified album
- facebook_album_ajax_get_photo_url in ./
facebook_album.module - Fetch an individual photo url from a Facebook album photo
- _facebook_album_fetch_application_access_token in ./
facebook_album.admin.inc - Build and make the api call for retrieving application access tokens from the facebook api.
File
- ./
facebook_album.module, line 459
Code
function _facebook_album_fetch_api_response($url) {
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $url);
curl_setopt($cURL, CURLOPT_HTTPGET, true);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
));
$result = curl_exec($cURL);
$content_type = curl_getinfo($cURL, CURLINFO_CONTENT_TYPE);
curl_close($cURL);
return _facebook_album_api_response_to_array($content_type, $result);
}