[InstagramBridge] Add author if available in response (#997)

Closes #905
This commit is contained in:
Corentin Garcia 2019-01-06 18:14:23 +01:00 committed by LogMANOriginal
parent 3160e62293
commit 18229b5c70

View file

@ -82,6 +82,10 @@ class InstagramBridge extends BridgeAbstract {
$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 {