dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
6k stars 1.14k forks source link

media.like method arguments #871

Closed bl9l closed 4 years ago

bl9l commented 5 years ago

Hi. I am getting ban when i am trying to like any post.

Here is the code image

I tryed to set module_name as 'profile', but then i've got this image

So what mean moduleInfo and d parameters?

Proxy: enabled, Version: "instagram-private-api": "^1.14.0"

bl9l commented 5 years ago

I got it

brendonpagano commented 5 years ago

Could you explain what you figured out of the situation?

bl9l commented 5 years ago

According to this issue, i realised that i must present two more arguments user_id and username. It was the reason for sintax error. And d means double-tap. So now the question is whose user_id and username should i provide? Mine or user whose post i am liking

bl9l commented 5 years ago

And one more. Should i use randomized module_name for each like? May be that is the reason?

brendonpagano commented 5 years ago

I like media with this function:

const likeMedia = (media) => {
    return ig.media.like({
      mediaId: media.id,
      d: 1,
      moduleInfo: { module_name: 'profile' },
    });
  };

With ig being an instantiated IgApiClient with a signed in user inside it's state.

It works, but I'd really like to know what the moduleInfo parameter is used for, and what impact does d makes on liking.

bl9l commented 5 years ago

I guess that moduleInfo means for Instagram service, the module from witch you make your like. @dilame please correct me if I am wrong

noopz commented 5 years ago

I suggest looking over this post on the php version of this API: https://github.com/mgp25/Instagram-API/issues/1602. It explains a bit more about the modules, I believe they should apply here as well. You can find additional information here: https://github.com/dilame/instagram-private-api/blob/master/docs/modules/_types_common_types_.md

bl9l commented 5 years ago

@ZackNeyland Thank you. I have already seen this. This is an explanation of the arguments. But there is not a word about behavior. I believe that I get banned due to improper behavior. Therefore, I need to model the behavior of the application.

Nerixyz commented 4 years ago

This thread has been inactive for a long time now, so it will be closed. If this is still an issue, reopen it.

Nisthar commented 4 years ago

still its not answered?