Giter Site home page Giter Site logo

t-hawk's Introduction

T-Hawk

Simple Twitter bot that auto likes and retweets based on a configured hashtag. Use for a special event or conference (like a DevFest!) to help increase social engagement and awareness.

This project derives its name from a small drone (UAV) of the same name with no other affiliation or association.

Getting Started

  • Log in and create a Twitter app
    • NOTE: Use the account you wish to like & retweet with (which most likely isn't your personal account)
    • NOTE: You do not need a Callback URL for this app
  • Start a new Google Apps Script project by clicking on "Start Scripting"
  • Copy the code from code.gs into the new file created for you
  • Enter the appropriate Twitter keys you received from your new Twitter app in lines 3-6
  • Enter your hashtag on line 7 (include "-RT" to exclude retweets from being liked and retweeted)
    • example: "#DevFest -RT"
  • From the Apps Script menu, choose "Resources" and then "Libraries"
    • In the "Add a library" field, enter the following project key to load the Twitter library:
      • 11dB74uW9VLpgvy1Ax3eBZ8J7as0ZrGtx4BPw7RKK-JQXyAJHBx98pY-7
    • Click the "Add" button
    • Change the "Identifier" field to Twitter
    • Change the "Version" to 23 (or the most recent)
    • Click "Save"
  • Create a trigger to continually monitor the hashtag
    • From the Apps Script menu, choose "Edit" and then "Current project's triggers"
    • Follow instructions to add a new trigger
    • Setup your trigger to match the following settings:
      • hashtag_twitterBot
      • Time-driven
      • Hour timer
      • Every hour
  • Enjoy!

Contributing

This project is open for contributions, suggestions, and ideas. Feel free to submit a PR and/or create an Issue with bugs, suggestions, and ideas. Stars are always welcome too!

See list of contributors.

License

Project is published under the MIT license.
Feel free to clone and modify repo as you want, but don't forget to add reference to original authors, thanks!

The T-Hawk Project is not endorsed and/or supported by Google, the corporation.

t-hawk's People

Contributors

brubsby avatar neojato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

t-hawk's Issues

Link hashtags not read

When the tweet has link , the script fails to read the hashtags ? What to do about it ?

Process More then 1 tweet

Is there a way to process more than one tweet at a time. I found the line to change the number (line 40) but when I change it to anything greater then 1 it errors out the script. I am not looking to spam just want to process a view more during runtime.

Bot retweets from accounts it has blocked

Our community wants to keep track of our hashtag, but it isn't uncommon for trolls to spam the hashtag with porn, insults, etc. The retweet bot retweets all these things /even if they come from accounts the bot has blocked/. This then makes curation impossible, because the blocked tweets do not show up on the bots profile retweets when signed in as the bot.

Good job

Really it's good job
but how can modify it to get only latest tweets and like it

thank u

Authentication Library

If I were to just follow the steps in your readme it seems as though you are missing the whole authentication part with twitter. Which library are you using? Please post the manifest.

can't get results in twitter

I followed instructions and it seems to run fine with no errors, but I am not seeing any likes or retweets in my twitter account...any thoughts? setup app in twitter.dev and added resource library, etc.. appreciate any guidance and support.... no logs to review unfortunately.

can't get this script working

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?

Delete / remove retweets?

Hi

This code is proving very useful to me, thanks for sharing it

But there is something that I cannot find to complete it ...

Does anyone know if you can complete this script or perform another one in javascript to be able to delete / remove retweets?

As much as I search, I can't find answers anywhere.

Thanks

I cannot get any results.

I followed all the instructions on the README but after several hours and no errors I am not seeing anything on Twitter.
I even looked for a different twitter library (on more recent) and still nothing happened

Is this the whole code or is this only a small piece?
What do I need to add to make it work?

Empty results seems to clobber since_id

I changed these lines to fix the problem for me, can also submit a PR

if (tweets) {
to
if (tweets.length > 0) {

the twitter api must send back an object that is truthy but has length 0.

after the since_id was clobbered it made it to where it would then try to retweet already retweeted posts and then die or something

Tweet favorite failed. Error was

Tweet favorite failed. Error was:
{"name":"Exception"}

options were:
{"method":"POST","payload":"id=1269419297157365761","headers":{"Authorization":"OAuth oauth_consumer_key="XXXXXX", oauth_nonce="XXXXXXX", oauth_signature="XXXXXX%XXXXX%3D", oauth_signature_method="XXXX-XXXXX", oauth_timestamp="XXXXX", oauth_token="XXXXX-XXXXX", oauth_version="1.0""},"escaping":false}

I get this error when trying to retweet or like anything

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.