I'm attempting to use the Instagram with Python and I'm running into an issue just using the stock examples on their GitHub page. I'm following the steps exactly in the first unauthenticated request section, and I'm being thrown the following errors.
My code:
from instagram.client import InstagramAPI
access_token = "..."
client_secret = "..."
client_id = "..."
api = InstagramAPI(client_id=client_id, client_secret=client_secret)
popular_media = api.media_popular(count=20)
for media in popular_media:
print media.images['standard_resolution'].url
The error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/instagram/bind.py", line 197, in _call
return method.execute()
File "/Library/Python/2.7/site-packages/instagram/bind.py", line 189, in execute
content, next = self._do_api_request(url, method, body, headers)
File "/Library/Python/2.7/site-packages/instagram/bind.py", line 131, in _do_api_request
raise InstagramClientError('Unable to parse response, not valid JSON.', status_code=response['status'])
instagram.bind.InstagramClientError: (404) Unable to parse response, not valid JSON.
Any help would be appreciated! Again, this code is just straight from the docs so I'm not sure why it's not working.