Skip to content

Commit

Permalink
Fetch comments_count and like_count data (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed Jul 9, 2020
1 parent b324be1 commit bfdf7b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InstagramClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function getMediaData(string $accessToken, int $moduleId = null, bool $ca
{
return $this->getData('https://graph.instagram.com/me/media', [
'access_token' => $accessToken,
'fields' => 'id,caption,media_type,media_url,permalink,thumbnail_url,timestamp',
'fields' => 'id,caption,comments_count,media_type,media_url,like_count,permalink,thumbnail_url,timestamp',
], $moduleId, $cache, $skipSslVerification);
}

Expand Down

4 comments on commit bfdf7b7

@Metis77
Copy link
Contributor

@Metis77 Metis77 commented on bfdf7b7 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in <?php $this->showTemplateVars(); ?>the new fields comments_count and like_count are not available.
Cleared Cache, updated DB.

@Metis77
Copy link
Contributor

@Metis77 Metis77 commented on bfdf7b7 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, on updating the db, no new fields have been created.
Just in case this helps.

@fritzmg
Copy link
Contributor

@fritzmg fritzmg commented on bfdf7b7 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, on updating the db, no new fields have been created.

Thos aren't database fields. They are fields from the Instagram API and are thus should available for each individual record.

@qzminski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Metis77 please comment on the issue and not the commit itself.

Please sign in to comment.