PHP-Instagram-Grabber icon indicating copy to clipboard operation
PHP-Instagram-Grabber copied to clipboard

Error

Open nagualcode opened this issue 8 years ago • 3 comments

Hello, my goal is to get URLs of photos of a given hashtag, with username and like counts. Here is what I am doing: `<?php require_once DIR . '/vendor/autoload.php'; $media = Bolandish\Instagram::getMediaByHashtag(ahashtag, 58); foreach($media as $value){ if ($value->dimensions->width === $value->dimensions->height){ echo $value->likes->count. ("\n"). $value->owner->username. ("\n"). $value->thumbnail_src. ("\n");

} } `

But I get:

PHP Notice: Trying to get property of non-object in /mnt/memory/moods/app/insta/api/src/Instagram.php on line 55 PHP Notice: Trying to get property of non-object in /mnt/memory/moods/app/insta/api/src/Instagram.php on line 55 PHP Warning: Invalid argument supplied for foreach()

Any help?

nagualcode avatar Dec 04 '16 00:12 nagualcode

@fredericofs Which version are you using? If you are using version < 1.0.10 please update it to .10 version :)

Bolandish avatar Dec 05 '16 07:12 Bolandish

last version. I found that the example.php wors on my osx machine. And fails of my raspbian jessy machine (where it used to work until last week). update from github on both. Installed lastest composer too on both.

nagualcode avatar Dec 05 '16 12:12 nagualcode

please send me a json_encoded dump of $media :)

Bolandish avatar Dec 05 '16 12:12 Bolandish