protected function Instagram::parse_response in Drupagram 6
Same name and namespace in other branches
- 7 drupagram.lib.php \Instagram::parse_response()
1 call to Instagram::parse_response()
- Instagram::call in ./
drupagram.lib.php - Method for calling any drupagram api resource
File
- ./
drupagram.lib.php, line 381 - Classes to implement the full Instagram API
Class
- Primary Instagram API implementation class Supports the full REST API for drupagram.
Code
protected function parse_response($response, $format = NULL) {
if (empty($format)) {
$format = $this->format;
}
switch ($format) {
case 'json':
// http://drupal.org/node/985544 - json_decode large integer issue
// $length = strlen(PHP_INT_MAX);
// $response = preg_replace('/"(id|in_reply_to_status_id)":(\d{' . $length . ',})/', '"\1":"\2"', $response);
return json_decode($response, TRUE);
}
}