public function mapServerResponse(
Response $responseObject,
$rawResponse,
HttpResponseInterface $httpResponse)
{
// Attempt to decode the raw JSON to an array.
// Important: Special JSON decoder which handles 64-bit numbers!
$jsonArray = $this->api_body_decode($rawResponse, true);
// If the server response is not an array, it means that JSON decoding
// failed or some other bad thing happened. So analyze the HTTP status
// code (if available) to see what really happened.
if (!is_array($jsonArray)) {
$httpStatusCode = $httpResponse !== null ? $httpResponse->getStatusCode() : null;
switch ($httpStatusCode) {
case 400:
throw new \InstagramAPI\Exception\BadRequestException('Invalid request options.');
case 404:
throw new \InstagramAPI\Exception\NotFoundException('Requested resource does not exist.');
default:
throw new \InstagramAPI\Exception\EmptyResponseException('No response from server. Either a connection or configuration error.');
}
}


Muhtemelen buradan hata veriyor sayfa 400 hatası dönüyor, sebebine gelecek olursak apiye gönderdiğiniz çıktı array olmadığındandır.