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 781 forks source link

Use access token for all requests if available #191

Closed ScottPolhemus closed 1 year ago

ScottPolhemus commented 8 years ago

Per the recent platform changes (#182), all requests should include an access token. This change uses the token for all API calls if it's been provided, preserving support for apps with legacy client IDs that don't yet require auth for certain methods.

foxshark commented 8 years ago

@ScottPolhemus - this was the key to making public requests work after the change #182 as you pointed out. I needed to add the public_content scope to make the token generation work fully, otherwise I had the following error:

"error_type":"OAuthPermissionsException","code":400,"error_message":"This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions."

Please accept my pull request to include this to your pull request.

TiS commented 8 years ago

Can you PLEASE merge this PR? This is really essential to work with current Instagram API.