You are here

protected function InstagramRequest::parse_response in Instagram Block 7

Parses the response.

2 calls to InstagramRequest::parse_response()
InstagramRequest::get_instagram_posts in ./instagram_block.lib.php
Get an array of InstagramPosts objects.
InstagramRequest::request in ./instagram_block.lib.php
Performs a request.

File

./instagram_block.lib.php, line 130
Instagram classes to integrate with the Instagram API.

Class

InstagramRequest
@file Instagram classes to integrate with the Instagram API.

Code

protected function parse_response($response) {

  // 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);
}