-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't get this script working #9
Comments
Have you found a fix yet? I have the same problem. I'm going to take a look at it again tomorrow so if I find a fix I'll let you know |
No, I haven't yet found the fix. Your help to fix the issue will be
appreciated.
|
I fixed it...i got stuff running...here's a piece of a very long
script...it's 40x longer than this...i just copied and pasted once i got it
working for different profiles, topics, etc.
it runs so often i'm getting temporary restricted by twitter for 3 days on
likes...so not running all the time but it works..might wnat to extend the
time cycle.. at the end from 36 to 50...let me know if any issues!! good
luck. .
gmail won't let me send as file..so just pasting all the code after my name
Best regards,
Eric
//working.js
var Twitter = require('Twitter');
var config = require('./config.js');
var T = new Twitter(config);
function follow1()
{
// Set up your search parameters
var params = {
q: 'bigdata',
count: 5,
result_type: 'recent',
lang: 'en'
}
// Initiate your search using the above paramaters
T.get('search/tweets', params, function(err, data, response) {
// If there is no error, proceed
if(!err){
// Loop through the returned tweets
for(let i = 0; i < data.statuses.length; i++){
// Get the screen_name from the returned data
let screen_name = data.statuses[i].user.screen_name;
// THE FOLLOWING MAGIC GOES HERE
T.post('friendships/create', {screen_name}, function(err, response){
if(err){
console.log(err);
} else {
console.log(screen_name, ': **FOLLOWED**');
}
});
}
} else {
console.log(err);
}
})}
//
follow1();
setInterval(follow1,3600000);
THATS IT!! also you need this file int he same folder filled out wiht your
info
//config.js
module.exports = {
consumer_key: 'rR7OceHVIiDiKKrvX6njc0xxx',
consumer_secret: 'anTEkupBuzctt48CVgnGIOCrhi6NOxvTa5QkhgpWiOkTaPxxxx',
access_token_key: '22370886-edZkDZrkaiczRm1gQLlRbYPQoYvyDmmey1cH7xxxx',
access_token_secret: 'dE1iNKhzTOuedLXabIYwbTOfZkMS4u7AekM7Z2SpBxxxx'
}
On Sat, Jun 6, 2020 at 10:24 PM Akshay Mathur <[email protected]>
wrote:
… No, I haven't yet found the fix. Your help to fix the issue will be
appreciated.
On Sun, Jun 7, 2020, 5:27 AM r63b ***@***.***> wrote:
> Have you found a fix yet? I have the same problem. I'm going to take a
> look at it again tomorrow so if I find a fix I'll let you know
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#9 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAA3RGXN2DGRLYTRKVTYMTDRVLJU7ANCNFSM4NTXUEFA
>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APN64BU5Y6CERNZHO56QZXDRVL25XANCNFSM4NTXUEFA>
.
|
Just delay the triggers in the google app settings so it doesn't repeat its self so often? |
here it is as a word file..i see the text above isn't legible...hopefully
this helps..it's all the code...it looks like your Authcode / config file
isn't setup right...the errors are in your logging in to get to the
API....not any code errors...double check config file and your oauth info!
best of luck
Best regards,
Eric
774.249.5287
…On Tue, Jun 9, 2020 at 12:15 PM r63b ***@***.***> wrote:
I fixed it...i got stuff running...here's a piece of a very long
script...it's 40x longer than this...i just copied and pasted once i got it
working for different profiles, topics, etc. it runs so often i'm getting
temporary restricted by twitter for 3 days on likes...so not running all
the time but it works..might wnat to extend the time cycle.. at the end
from 36 to 50...let me know if any issues!! good luck. . gmail won't let me
send as file..so just pasting all the code after my name Best regards, Eric
//working.js var Twitter = require('Twitter'); var config =
require('./config.js'); var T = new Twitter(config); function follow1() {
// Set up your search parameters var params = { q: 'bigdata', count: 5,
result_type: 'recent', lang: 'en' } // Initiate your search using the above
paramaters T.get('search/tweets', params, function(err, data, response) {
// If there is no error, proceed if(!err){ // Loop through the returned
tweets for(let i = 0; i < data.statuses.length; i++){ // Get the
screen_name from the returned data let screen_name =
data.statuses[i].user.screen_name; // THE FOLLOWING MAGIC GOES HERE
T.post('friendships/create', {screen_name}, function(err, response){
if(err){ console.log(err); } else { console.log(screen_name, ': *FOLLOWED*');
} }); } } else { console.log(err); } })} // follow1();
setInterval(follow1,3600000); THATS IT!! also you need this file int he
same folder filled out wiht your info //config.js module.exports = {
consumer_key: 'rR7OceHVIiDiKKrvX6njc0xxx', consumer_secret:
'anTEkupBuzctt48CVgnGIOCrhi6NOxvTa5QkhgpWiOkTaPxxxx', access_token_key:
'22370886-edZkDZrkaiczRm1gQLlRbYPQoYvyDmmey1cH7xxxx', access_token_secret:
'dE1iNKhzTOuedLXabIYwbTOfZkMS4u7AekM7Z2SpBxxxx' } On Sat, Jun 6, 2020 at
10:24 PM Akshay Mathur ***@***.*** wrote:
… <#m_7483660569420067871_>
No, I haven't yet found the fix. Your help to fix the issue will be
appreciated. On Sun, Jun 7, 2020, 5:27 AM r63b *@*.***> wrote: > Have you
found a fix yet? I have the same problem. I'm going to take a > look at it
again tomorrow so if I find a fix I'll let you know > > — > You are
receiving this because you authored the thread. > Reply to this email
directly, view it on GitHub > <#9 (comment)
<#9 (comment)>>, or
> unsubscribe > <
https://github.com/notifications/unsubscribe-auth/AAA3RGXN2DGRLYTRKVTYMTDRVLJU7ANCNFSM4NTXUEFA
> > . > — You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#9 (comment)
<#9 (comment)>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/APN64BU5Y6CERNZHO56QZXDRVL25XANCNFSM4NTXUEFA
.
Just delay the triggers in the google app settings so it doesn't repeat
its self so often?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APN64BUVMKPNTKZPCSQQEHTRVZNY5ANCNFSM4NTXUEFA>
.
|
See #12 for latest on this issue. |
I followed the steps in the readme document and executed the script. It runs without any error but isn't working on twitter that means no likes for the hashtag.
Can some help me debug, please?
The text was updated successfully, but these errors were encountered: