When using the pagination function I got an error because the call constructed contained two api version entries. The api call value returned by Instagram already contains a version entry and is already valid for the subsequent call. The existing code removes the API_URL causing _makeCall to add in a second api version entry. The following code works correctly:
// $function = str_replace(self::API_URL, '', $apiCall[0]);
parse_str($apiCall[1], $params);
// No need to include access token as this will be handled by _makeCall
unset($params['access_token']);
// return $this->_makeCall($function, $params);
return $this->_makeCall($apiCall[0], $params);
When using the pagination function I got an error because the call constructed contained two api version entries. The api call value returned by Instagram already contains a version entry and is already valid for the subsequent call. The existing code removes the API_URL causing _makeCall to add in a second api version entry. The following code works correctly: