Skip to content

Commit

Permalink
Fixed the Instagram getFeed() method
Browse files Browse the repository at this point in the history
  • Loading branch information
danjdewhurst committed Apr 24, 2018
1 parent 8cadb71 commit 0e6da26
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SocialFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,8 @@ public function setCredentials(array $credentials) {

public function getFeed($username) {
$response = [];
$data = $this->getApi("users/search?q=$username");
$id = $data->data[0]->id;
$data = $this->getApi("users/$id/media/recent/");
$data = $this->getApi("users/self");
$data = $this->getApi("users/self/media/recent");
foreach ($data->data as $item) {
$response[] = $this->parseItem($item);
}
Expand Down

0 comments on commit 0e6da26

Please sign in to comment.