From 484c974a1aae001f538ad354a004c354dd492ae5 Mon Sep 17 00:00:00 2001 From: ScottPolhemus Date: Sun, 10 Jan 2016 20:25:42 -0500 Subject: [PATCH] Use access token for all requests if available --- src/Instagram.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index 1fb70f2..7039beb 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -575,7 +575,7 @@ public function getOAuthToken($code, $token = false) */ protected function _makeCall($function, $auth = false, $params = null, $method = 'GET') { - if (!$auth) { + if (!$auth && !isset($this->_accesstoken)) { // if the call doesn't requires authentication $authMethod = '?client_id=' . $this->getApiKey(); } else {