protected function Twitter::parse_response in Twitter 6.5
Same name and namespace in other branches
- 6.3 twitter.lib.php \Twitter::parse_response()
- 7.6 twitter.lib.php \Twitter::parse_response()
- 7.3 twitter.lib.php \Twitter::parse_response()
- 7.5 twitter.lib.php \Twitter::parse_response()
See also
https://www.drupal.org/node/985544
2 calls to Twitter::parse_response()
- Twitter::call in ./
twitter.lib.php - Calls a Twitter API endpoint.
- Twitter::request in ./
twitter.lib.php - Performs a request.
File
- ./
twitter.lib.php, line 196 - Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1
Class
- Primary Twitter API implementation class
Code
protected function parse_response($response) {
$length = strlen(PHP_INT_MAX);
$response = preg_replace('/"(id|in_reply_to_status_id|in_reply_to_user_id)":(\\d{' . $length . ',})/', '"\\1":"\\2"', $response);
return json_decode($response, TRUE);
}