Skip to content

Commit

Permalink
[InstagramBridge] Add author if available in response (#997)
Browse files Browse the repository at this point in the history
Closes #905
  • Loading branch information
corenting authored and logmanoriginal committed Jan 6, 2019
1 parent 3160e62 commit 18229b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridges/InstagramBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public function collectData(){
$item = array();
$item['uri'] = self::URI . 'p/' . $media->shortcode . '/';

if (isset($media->owner->username)) {
$item['author'] = $media->owner->username;
}

if (isset($media->edge_media_to_caption->edges[0]->node->text)) {
$textContent = $media->edge_media_to_caption->edges[0]->node->text;
} else {
Expand Down

0 comments on commit 18229b5

Please sign in to comment.