Question

I have auth'ed with Instagram API and can retrieve media objects with no problem. The function 'follow_user(user_id) returns this:

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/instagram/bind.py", line 84, in _build_path
raise Exception('No parameter value found for path variable: %s' % name)
Exception: No parameter value found for path variable: user_id

I've tried using a string, integer, and the media.user.id property as a parameter for this function but the same error each time.

Was it helpful?

Solution

My workaround is to use a manual HTTP POST request to the API using the Requests module:

   payload = { "ACCESS_TOKEN" : "Your_Instagram_Access_Token_Here",
              "action" : "follow"}
   r = requests.post(r'https://api.instagram.com/v1/users/'+ user_id +'/relationship?access_token=Your_Instagram_API_Token_HERe',data=payload)
   print r.text

OTHER TIPS

Old question - but the correct call is...

api.follow_user(user_id=the_user_id) 

...where 'the_user_id' is the ID number you're trying to follow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top