Skip to content

Instantly share code, notes, and snippets.

@stantonk
Created November 9, 2015 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stantonk/5b0a2a2cdb9906ae038f to your computer and use it in GitHub Desktop.
Save stantonk/5b0a2a2cdb9906ae038f to your computer and use it in GitHub Desktop.
Demonstrate bug in signing of POST requests in instagram/python-instagram
# -*- coding: utf-8 -*-
from instagram.client import InstagramAPI
import time
access_token = "REDACTED"
api = InstagramAPI(access_token=access_token, client_id='REDACTED', client_secret='REDACTED')
media_id = 'REDACTED'
response = api.media(media_id=media_id)
print response.link
t = int(time.time())
#response = api.create_media_comment(media_id=media_id, text='woot woot %s' % t)
response = api.create_media_comment(media_id=media_id, text=u'😛 %s' % t)
print response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment