You are here

public function Twitter::statuses_oembed in Twitter 6.5

Same name and namespace in other branches
  1. 7.6 twitter.lib.php \Twitter::statuses_oembed()
  2. 7.5 twitter.lib.php \Twitter::statuses_oembed()

Returns information allowing the creation of an embedded representation of a Tweet on third party sites.

Parameters

mixed $id: The Tweet/status ID or the URL of the Tweet/status to be embedded.

array $params: an array of parameters.

See also

https://dev.twitter.com/docs/api/1.1/get/statuses/oembed

File

./twitter.lib.php, line 427
Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1

Class

Twitter
Primary Twitter API implementation class

Code

public function statuses_oembed($id, $params = array()) {
  if (is_numeric($id)) {
    $params['id'] = $id;
  }
  else {
    $params['url'] = $id;
  }
  return $this
    ->call('statuses/oembed', $params, 'GET');
}