Skip to content

Commit

Permalink
Merge pull request #1 from gilgledson/gilgledson-funtion-getImageId-1
Browse files Browse the repository at this point in the history
Function getImagemId
  • Loading branch information
gilgledson authored Oct 26, 2016
2 parents a68e248 + 794fa0b commit a6e9965
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,11 @@ public function searchUser($name, $limit = 0)
*
* @return string id image
*
* @throws \MetzWeb\Instagram\InstagramException
*/
public function getImageid($url)
{

public function getImageId($url)
{
$json_file = file_get_contents('http://api.instagram.com/oembed?url='.$url);
$json_str = json_decode($json_file, true);

$json_str = json_decode($json_file, true);

return $json_str['media_id'];
}
Expand Down

0 comments on commit a6e9965

Please sign in to comment.