protected function buildApiUrl(string $path, array $parameters): string
    {
        $parameters = array_merge([
            'access_token' => $this->accessToken,
        ], $parameters);

        $query = http_build_query($parameters, '', '&');

        return 'https://api.instagram.com/v1/'.$path.'?'.$query;
    }
protected function buildApiUrl(string $path, array $parameters): string
    {
        $parameters = array_merge([
            'access_token' => $this->accessToken,
        ], $parameters);

        $query = http_build_query($parameters, '', '&');

        return 'https://api.instagram.com/v1/'.$path.'?'.$query;
    }
protected function buildApiUrl ( string $ path , array $ parameters ) : string { $ parameters = array_merge ( [ 'access_token' => $ this -> accessToken , ] , $ parameters ) ; $ query = http_build_query ( $ parameters , '' , '&' ) ; return 'https://api.instagram.com/v1/' . $ path . '?' . $ query ; }
Add access token and escape parameters.

@param string $path
@param array $parameters

@return string
Add access token and escape parameters .