python - New(ish) requirements for Instagram API POST endpoint -
i wrote python script (automatically likes mediaids given user-defined list of hashtags) accesses instagram api endpoint post /media/media-id/likes using python-instagram library. program has been running year, many friends (and others) have used since.
so tried set person today registering new instagram client. ran this on developer landing page. states instagram requiring users request access post endpoints.
here snippet of code fails:
for mid in mediaids: #rate limit 30 requests/hour time.sleep(121) api_sub2 = iglogin_api() try: api.like_media(media_id=mid.id) like_count +=1 userids.append(mid.user) liked_mediaids.append(mid) img_urls.append(mid.images['standard_resolution'].url) except: e = sys.exc_info()[0] print "already liked %s or %s" % (str(mid),str(e))
the exception raised:
c:\users\andrew\desktop\pygram>python ig_like.py likedmedia: 1006563954514666042_1643375967 or (<class'instagram.bind.instagramapierror'>, instagramapierror(), <traceback object @ 0x0000000002c54648>)
has instagram beaten bots? can offer work-around?
likes, relationships , comments require approval.
the ability post , delete likes, follows , comments restricted applications offer business services , not consumer facing apps. in particular, may approve following types of business services:
• media rights management: example platform media publishers , brands request permission instagram community use instagram content.
• social media management: example, platform businesses integrate instagram in social media workflow
to request access endpoint, fill form
i still on process of finding way work around it.
Comments
Post a Comment