From fe658aeac8bd1d3c222d9514f9c329355a8ee194 Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Tue, 21 Jun 2016 23:38:04 -0300 Subject: [PATCH 1/8] function for get image id the function is used to convert the image url In id To Be Used in Function of like --- src/Instagram.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index 1fb70f2..77a7802 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -149,7 +149,21 @@ public function searchUser($name, $limit = 0) return $this->_makeCall('users/search', false, $params); } - + /** + * Generates the OAuth login URL. + * + * @param string url image + * + * @return string id image + * + * @throws \MetzWeb\Instagram\InstagramException + */ + public function getImageID($url){ + $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); + $json_str = json_decode($json_file, true); + return $json_str['media_id']; + + } /** * Get user info. * From a2e44bceaea5c1a7f42cf14122007a3fc2127876 Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Tue, 21 Jun 2016 23:51:54 -0300 Subject: [PATCH 2/8] Update Instagram.php --- src/Instagram.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Instagram.php b/src/Instagram.php index 77a7802..b8e0e12 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -158,12 +158,12 @@ public function searchUser($name, $limit = 0) * * @throws \MetzWeb\Instagram\InstagramException */ - public function getImageID($url){ - $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); - $json_str = json_decode($json_file, true); - return $json_str['media_id']; - - } + public function getImageID($url) ++ { ++ $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); ++ $json_str = json_decode($json_file, true); ++ return $json_str['media_id']; + } /** * Get user info. * From 7c310d5169e342fd10ff62f1842bb10b70b3244b Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Tue, 21 Jun 2016 23:53:55 -0300 Subject: [PATCH 3/8] Update Instagram.php --- src/Instagram.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index b8e0e12..96c6189 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -158,10 +158,11 @@ public function searchUser($name, $limit = 0) * * @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); + + return $json_str['media_id']; } /** From cba98cd9639c9825d2ee407bd8792141ce17cedc Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Tue, 21 Jun 2016 23:56:39 -0300 Subject: [PATCH 4/8] Update Instagram.php --- src/Instagram.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index 96c6189..2d96fd3 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -149,6 +149,7 @@ public function searchUser($name, $limit = 0) return $this->_makeCall('users/search', false, $params); } + /** * Generates the OAuth login URL. * @@ -161,7 +162,7 @@ public function searchUser($name, $limit = 0) 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']; } From 9aa2b066d0801be314fff8d569f158ea71196f3f Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Tue, 21 Jun 2016 23:59:46 -0300 Subject: [PATCH 5/8] Update Instagram.php --- src/Instagram.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Instagram.php b/src/Instagram.php index 2d96fd3..cb3d470 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -160,11 +160,11 @@ public function searchUser($name, $limit = 0) * @throws \MetzWeb\Instagram\InstagramException */ public function getImageid($url) -+ { -+ $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); -+ $json_str = json_decode($json_file, true); - -+ return $json_str['media_id']; + { + $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); + $json_str = json_decode($json_file, true); + + return $json_str['media_id']; } /** * Get user info. From 487c747a2f9cb403c69d3a77c04c5cea32cc1562 Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Wed, 22 Jun 2016 00:04:05 -0300 Subject: [PATCH 6/8] Update Instagram.php --- src/Instagram.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index cb3d470..a108b6f 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -161,7 +161,7 @@ public function searchUser($name, $limit = 0) */ public function getImageid($url) { - $json_file = file_get_contents("http://api.instagram.com/oembed?url=".$url); + $json_file = file_get_contents('http://api.instagram.com/oembed?url='.$url); $json_str = json_decode($json_file, true); return $json_str['media_id']; From a68e24875f7ae9a79b161c05087c13a5a896fab0 Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Wed, 22 Jun 2016 00:06:17 -0300 Subject: [PATCH 7/8] Update Instagram.php --- src/Instagram.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Instagram.php b/src/Instagram.php index a108b6f..ad7892f 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -161,8 +161,10 @@ public function searchUser($name, $limit = 0) */ public function getImageid($url) { + $json_file = file_get_contents('http://api.instagram.com/oembed?url='.$url); $json_str = json_decode($json_file, true); + return $json_str['media_id']; } From 794fa0b4f72a45070a6f9e21879b4f3218bc90d4 Mon Sep 17 00:00:00 2001 From: Gilgledson souza Date: Wed, 26 Oct 2016 12:11:39 -0200 Subject: [PATCH 8/8] Function getImagemId the function is used for get id of image. --- src/Instagram.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Instagram.php b/src/Instagram.php index ad7892f..a12f6d3 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -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']; }