Git Product home page Git Product logo

teletweet's Introduction

TwitterBot

πŸ¦‰ A telegram Twitter bot that will allow you to send tweets!

Supports Twitter API v2! πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰

This bot runs perfectly on DartNode!

DartNode

Find out more on DartNode

Features

All the following features rely on authorized users.

  • send text tweet
  • send tweet with one photo(photo and document are supported.)
  • reply bot tweet message to add more tweets to this thread
  • reply /delete to delete tweet
  • send any video tweet to download the video If you have Basic or Access subscription, you can download video tweet.
  • send pictures as media group, it will result in multiple photos in your tweet(max photo restrictions is 4)

Commands

start - Start using it today
sign_in - Go to sign in with Twitter
sign_off - sign off from Twitter
help - What is this bot
ping - Status about this bot
delete - Delete tweet

Usage

Screenshots

The most simple way to tweet!

Sign in

Chat with this bot, and go to oauth by its instruction:

Copy and paste the auth code to this bot. And you're good to go!

Tweet

New thread tweet

Send any text message, photo/photo as file with caption will send tweet with photos.

Reply to this thread

Reply to bot's tweet message,

and you'll consult in a series of thread.

Delete tweet

Reply command /delete to bot's message and it will delete this tweet for you.

Download tweet video

ONLY WORKS IF YOU HAVE BASIC OR PRO SUBSCRIOTION

You could just send any video tweet, such as this one

https://twitter.com/BennyThinks/status/1306081739660427264?s=20

The bot will first determine if this is a video tweet, if the answer is yes, it will ask what do you want to do with it:

Depending on your choice, this bot will download this video or retweet.

multiple photo mode

Group feature requires a newer version of Telegram Just send a group of photos, add some captions if you want to, and hit send.

Warning: if you send more than four photos in a group, this bot will only send first four photos in a tweet

General deployment

This bot use oauth, so you need to apply an app, setup callback url.

Setup Twitter Developer

  1. Apply a Twitter Developer account https://developer.twitter.com/en/portal/dashboard
  2. Create a project
  3. Create an app and attach it to your project. Remember API key and API secret key!
  4. User authentication settings, Click Edit and enable OAuth
  5. App permissions Read/Write, Web App, Automated App or Bot, Callback http://127.0.0.1:8888/callback

Setup Telegram APP ID

Get it from https://core.telegram.org/

Run Web server

vim twauth.py
# change this three lines to your own
# CONSUMER_KEY ---> API key
# CONSUMER_SECRET ---> API secret key
APP_CONSUMER_KEY = os.environ.get("CONSUMER_KEY") or '1'
APP_CONSUMER_SECRET = os.environ.get("CONSUMER_SECRET") or '2'
callback_url = os.environ.get("CALLBACK_URL") or "http://127.0.0.1:8888/callback"

# run it
python3 twauth.py

Open http://127.0.0.1:8888 in your browser and follow the instructions.

Run Bot

git clone https://github.com/tgbot-collection/TeleTweet/
cd TeleTweet
pip3 install -r requirements.txt
vim teletweet/config.py
# setup bot token, consumer key, consumer secret, app id, app secret
python3 teletweet/bot.py

If you want the bot to be only available to you, please setup ALLOW_USER with your own Telegram User ID. Use , to separate.

Send /sign_in to bot,paste your auth code, and you're good to go!

Docker

You can run/develop using docker. You can refer to docker-compose.yml

echo "{}"> env/auth.json
vim env/teletweet.env
# set up below config
BOT_TOKEN = os.getenv("TOKEN", "fghjk789")
APP_ID = os.getenv("APP_ID", "456fgh78")
APP_HASH = os.getenv("APP_HASH", "456gfhj78")

CONSUMER_KEY = os.getenv("CONSUMER_KEY", "456fghj78")
CONSUMER_SECRET = os.getenv("CONSUMER_SECRET", "45678fghj")

docker-compose up -d

Plans

  • support multi-user, based on oauth
  • help
  • about
  • start
  • multi photo

Credits

License

GPL 2.0__

teletweet's People

Contributors

aurabear avatar bennythink avatar dependabot[bot] 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

teletweet's Issues

[{'code': 185, 'message': 'User is over daily status update limit.'}]

I would start by thanking you for the service, and with that I would like to submit a few of my thought.
If it is possible to apply, do try to make it happen, whenever you like too, No Rush.

I received a message, when I overused the bot - ** 185 - over User Daily Limit**
it is probably due to Twitter API limit in regard to that if it would be possible to set a time limit on per bot user

Step 1. If a user send more than 5 messages to bot under 5 Minutes for tweeting only
Then
6th Next message Should be auto-scheduled to send after 2 minutes.
If User send another message before the delivery of 6th message
then it should be auto scheduled for 2 minute again after the delivery of 6th message
and so on.
Step 2.if the user send a message after 2 minutes than the bot will consider next messages from Step.1 again.

I hope I am able to delivery my thoughts in a mannerful way, with that β€œThank You” Again

Error: "Sorry, you don't have the permission to send tweets."

I've been getting a lot of this:
image
But it's not like I don't have permission, bc some tweets go through, and these don't. Could the msg be more explicit about the cause? Other error msgs say "msg too long", "video too long", "non-authorised link", etc. It'd be good if this one did too.

Download or Tweet?

When posting a tweet to Telegram (perhaps only ones with videos), TeleTweet asks whether to download or retweet it:
image
Could there be a setting to always do one or the other... or keep asking every time?

Invalid reponse , status 403. Application can not perform write actions on Trying to Use link to sign in

teletweet2
We had successfully used TeleTweet Bot with our telegram ID.
But after some time it started giving error code 261 upon trying to tweet.
I stopped the bot and started and signed in again.
But I was not able to sign in using the link . I got the error code status 403. Application can not perform write actions.
Kindly help us urgently . We nneeded it up and runnig for our campaign within few hours.
thanks
teletweet1

Tweet Download

Hi again,
Here i won't take much of your time, but do Regards you for a great bot at first,
And then i there is something

I was downloading a video from twitter i find a minor bug that bot can download video from "https" address link but not from "http", this is little bug, okay just want to let you know also.
Examples

Working - https://twitter.com/LakhanMeenaINC/status/1375363254097088516?s=19

Not working - http://twitter.com/LakhanMeenaINC/status/1375363254097088516?s=19

And since i am writing about this, i want to ask if photos can also be download by same way, that'll be great, but completely upto you, Once Again Thank you for your support and great service.

Error: [{'message': 'You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only

hello ,

Good day. did anyone have Same issue and get a solution? Does this mean that api V1.1 no longer works?

94804E83-718C-4086-821C-F7ADA87AF1B4

any insight would be appreciate!

❌ Error: [{'message': 'You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product', 'code': 453}]

Bot only tweeting the admin who added it in a group

Hi Benny, I'm trying out your excellent @tele_tweetbot. I managed to have it tweet everyone's posts in a group, but after moving things around, it only tweets my posts. How can I get it to tweet everyone again? Is it something to do with admin/member permissions?

docker compose deploy error : no such file or directory : auth.json

dear developer,
thanks for your great work. may i ask how to fix the error below? no such file or directory : auth.json
and as pic2 shown the py service is only listen on 127.0.0.1 , even though i had set callback url in teletweet.env to my container ip address, so i think this is the problem.

thanks for your help again.

pic1

image

pic 2
image

Silent mode

image
It's good having this notification (especially with the link to the tweet!), but after a while, when things are running smoothly, it becomes a nuisance. Is there an option to turn it off?

Text must be less than or equal to CHARACTER_LIMIT characters.

Dear developer, I was using teletweet for just few days and it made me so much curious and I stumble upon many things , that it should do more, so here I will just saying what can help me little,

Issue- Error: Text must be less than or equal to CHARACTER_LIMIT characters.
Need- when bot hit the wall of character limit, can this be possible that line break (Enter bottom) command can be used to split the
text into threading tweet, only when text limit breached from current tweet.

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.