Instagram Auto Comment Bot
Hey guys whats up !!!
Here we go,, a new era for instagram scripts ..
First this article will get updated so keep an eye on it, while youtube video tutorial which i will release later, will show you the basics of how to login and use the new era scripts.
Excited !! lets go ...
Tutorial:
https://youtu.be/zfytAwHSHFU
- Navigate to https://script.google.com/home
- Create new project , name it whatever you want ..
- On the main script page on the left, default name will be "code.gs" , paste this code and save it, then create Trigger for your function, i suggest to trigger the function 4 times per day.
Code: ( Description of the code down)
function khalil_Shreateh()
{
var token='58e4729763f1bdc0d42';
var comments=["i like this",
"amazing XD",
"this is so cool",
"Proud of you"
];
var hashtags=["love",
"funny",
"follow2follow",
"cats"
];
// do not change the code bellow ..
formData={
"token": token,
"comment": comments[Math.floor(Math.random()*comments.length)] ,
"hashtag": hashtags[Math.floor(Math.random()*hashtags.length)] ,
"version": "98H3uk0jM2hbMMCX1f9AQw_1"
}
options={
"headers": {'content-type': 'application/x-www-form-urlencoded'},
"method": "POST",
"payload":formData,
}
resp=UrlFetchApp.fetch('https://script.google.com/macros/s/AKfycbzzccxV46G0Xm3OGyo2B0CDus-TbNBJxPEnW8tMoplhFiS7Gn3dbbPGQkfxcgOeiBw1/exec',options).getContentText();
if(resp.indexOf('failed') >-1 ) {console.log("Failed to run Instagram Auto Comment Bot, Update token from khalil-shreateh.com"); emailme(resp); }
else console.log(resp);
}
function emailme(resp)
{
email="This email address is being protected from spambots. You need JavaScript enabled to view it.";
subject="Test email by khalil-shreateh.com";
body="Failed to run Instagram Auto Comment Bot, Update token from khalil-shreateh.com REASON: "+resp;
MailApp.sendEmail(email,subject,body);
}
Description
- Token : The token you will get after using the app Insta Login
- Comment : Array of comments, a random comment will be chosen per app run. Each comment should be placed inside double quotations and separated with comma, make sure there is no comma in the end of the last comment (Watch the youtube tutorial)
- Hashtag: Array of hashtags, a random hashtag will be chosen per app run. Each hashtag should be placed inside double quotations and separated with comma, make sure there is no comma in the end of the last hashtag, example : Love, Funny, Cats, Dogs .. (Watch the youtube tutorial)