function _flickrapi_post in Flickr API 7
Same name and namespace in other branches
- 7.2 flickrapi.module \_flickrapi_post()
Custom post function to enable OAuth requests.
Parameters
String $url: the callback url for the API
Array $data: associative array with all Flickr paramters
Return value
String serialized PHP response format see: http://www.flickr.com/services/api/response.php.html
1 string reference to '_flickrapi_post'
- flickrapi_phpFlickr in ./
flickrapi.module - Returns the phpFlickr object.
File
- ./
flickrapi.module, line 149 - FlickAPI integration module.
Code
function _flickrapi_post($url, $data) {
$consumer = DrupalOAuthConsumer::load(variable_get('flickrapi_api_key', ''), FALSE);
$sig_method = FlickrApiOAuthClient::signatureMethod();
$client = new FlickrApiOAuthClient($consumer, NULL, $sig_method);
$response = $client
->get($url, array(
'token' => TRUE,
'params' => $data,
));
return $response;
}