cosenary / Instagram-PHP-API

An easy-to-use PHP Class for accessing Instagram's API.
http://cosenary.github.com/Instagram-PHP-API
BSD 3-Clause "New" or "Revised" License
1.46k stars 782 forks source link

No JSON Data #95

Open ghendrickson89 opened 9 years ago

ghendrickson89 commented 9 years ago

For some reason, I don't seem to be getting any data put into the $jsonData, but it's all getting put into the $headerData. I'm also getting this exception:

( ! ) Notice: Undefined offset: 1 in C:\wamp\www\Insta\src\Instagram.php on line 448 Call Stack

Time Memory Function Location

1 0.0004 253312 {main}( ) ..\success.php:0 2 0.2117 419608 MetzWeb\Instagram\Instagram->getUserMedia( ) ..\success.php:35 3 0.2117 420648 MetzWeb\Instagram\Instagram->_makeCall( ) ..\Instagram.php:148

Any thoughts?

ramiroaraujo commented 9 years ago

seeing the same issue just about now. The breaking change was introduced here: https://github.com/cosenary/Instagram-PHP-API/commit/6ee32c0aeeb82973c73a471ef80808cc0512962a

victorsa commented 9 years ago

To solve this, try to comment line 491 to 500 from src/Instagram.php

jamiel commented 9 years ago

The breaking change in 6ee32c0aeeb82973c73a471ef80808cc0512962a is on systems which do not return the headers by default on curl requests. It would require:

curl_setopt($ch, CURLOPT_HEADER, 1);

Currently the library is broken due to this change.

angelxmoreno commented 9 years ago

PR #100 should do the trick. but for now the entire lib is broken in the latest release.

cosenary commented 9 years ago

Sorry for any inconvenience. This is fixed with commit 019b3dcf91ddad2a3a9c15e75b605bf57c2f0ca4