Closed iamsk closed 9 years ago
It appears that you don't include the secret of your app, can you please see if you have included the secret or token?
Yep, All bots need init InstagramAPI with client_secret.
Need client_secret here: https://github.com/gipmon/instagram-bot/blob/master/bot/bot.py#L23
You can create a merge commit if you want 😊 Thank you!!
No, thanks :smile:
Can I ask you some questions, where can I change the permission?
instagram.bind.InstagramAPIError: (400) OAuthPermissionsException-This request requires scope=likes, but this access token is not authorized with this scope. The user must re-authorize your application with scope=likes to be granted write permissions.
I already use scope(likes) to get access token, but only get basic info always.
That bug is showing to me too. I am trying to see what is the cause.. I use the scope = likes too and it shows to me that error.
Fixed the error with: 16c1b72d31b3f023e76699373ee4d6402145dc0b
Everything is configured
Traceback (most recent call last): File "bot.py", line 132, in
bot.run()
File "bot.py", line 105, in run
count=likes_for_this_tag)
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/bind.py", line 196, in _call
return method.execute()
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/bind.py", line 182, in execute
include_secret=self.include_secret)
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/oauth2.py", line 224, in prepare_request
url = self._full_url_with_params(path, params, include_secret)
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/oauth2.py", line 148, in _full_url_with_params
self._full_query_with_params(params) +
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/oauth2.py", line 144, in _full_url
self._signed_request(path, {}, include_signed_request, include_secret))
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/oauth2.py", line 172, in _signed_request
return "&sig=%s" % self._generate_sig(path, params, self.api.client_secret)
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/site-packages/instagram/oauth2.py", line 127, in _generate_sig
return hmac.new(secret, sig, sha256).hexdigest()
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/hmac.py", line 133, in new
return HMAC(key, msg, digestmod)
File "/Users/zhangbin/.pythonbrew/pythons/Python-2.7.2/lib/python2.7/hmac.py", line 68, in init
if len(key) > blocksize:
TypeError: object of type 'NoneType' has no len()