Last active
March 19, 2021 18:18
-
-
Save vncsna/3d30703f06bf467d50e3c394a753c210 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function follow_user(user_id){ | |
.post( | |
'friendships/create', | |
{user_id: user_id, | |
follow: false} | |
) | |
.then(result => { | |
let tweet_pt = `Seguindo @${result.data.screen_name}!?` | |
let tweet_en = `Following @${result.data.screen_name}!!` | |
let tweet = coin_toss ? tweet_pt : tweet_en | |
twitter.post( | |
'statuses/update', | |
{'status': tweet} | |
) | |
console.log(tweet) | |
}) | |
.catch(error => { | |
console.log('follow_user') | |
console.log(error) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment