1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[IMPORTANT] Instagram API “You Cannot Like this Media” 400 status code

Discussion in 'Instagram' started by donjuan3535, May 19, 2015.

  1. donjuan3535

    donjuan3535 Newbie

    Joined:
    Oct 30, 2013
    Messages:
    12
    Likes Received:
    1
    hi all,

    Im getting this error while liking photos, but waiting at least 7 seconds between likes.
    After 20 - 25 successfully likes my tokens getting this error.
    ?You Cannot Like this Media?

    and after that cant like anymore.

    what exactly triggers this error? is my delay too short?
     
  2. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    773
    Likes Received:
    280
    Location:
    PHP Scripting ;)
    Its not the delay, its probably the rate limiting to the specific endpoint.

    Are you using signed requests or unsigned requests? Because for POST media/likes end point, the rate limiting is 30 per hour for unsigned requests. You might want to make it to a signed request, to get past that and to be in the slab of 100 likes/hour.

    About rate limits : https://instagram.com/developer/limits/

    About signing your requests : https://instagram.com/developer/secure-api-requests/
     
  3. donjuan3535

    donjuan3535 Newbie

    Joined:
    Oct 30, 2013
    Messages:
    12
    Likes Received:
    1
    Im using signed requests.
    But its not the limit error because limit error's code is 429 OAuthRateLimitException.
     
  4. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    773
    Likes Received:
    280
    Location:
    PHP Scripting ;)
    In that case, well, are you collecting the media id using a script, and liking it using another script? I mean, are they both using the same tokens? or random ones? There might be a case, you scrapped media ids using a random token from the list, and is trying to like it from another one. In that case, there might be a privacy issue.

    Thats whats coming in my mind as of now.
     
  5. donjuan3535

    donjuan3535 Newbie

    Joined:
    Oct 30, 2013
    Messages:
    12
    Likes Received:
    1
    no, all tokens are in same script. users like the photos what they want, there is no random situation
     
  6. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    773
    Likes Received:
    280
    Location:
    PHP Scripting ;)
    Tokens? or Token. I was asking whether getting the media id and liking the media was done using the same token.

    If thats right too, well, I dont really have any clue whats wrong with the script.
     
  7. donjuan3535

    donjuan3535 Newbie

    Joined:
    Oct 30, 2013
    Messages:
    12
    Likes Received:
    1
    media ids are on database. getting them from db and when clicked to like button checking if media is available via api. then likes it via api.
     
  8. donjuan3535

    donjuan3535 Newbie

    Joined:
    Oct 30, 2013
    Messages:
    12
    Likes Received:
    1
    nobody knows whats this?