Skip to content
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

Failing to retrieve images from Twitter #10

Open
StephenBass opened this issue Nov 3, 2021 · 7 comments
Open

Failing to retrieve images from Twitter #10

StephenBass opened this issue Nov 3, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@StephenBass
Copy link

First off, thank you for the amazing bot!
Everything is in working order, however, I notice Tweets which include images are not appearing with the image in our Telegram channel.
Is there a setting to include images? One example from the Manchester United sample group below shows images working.

Thanks

image

@dracarys18 dracarys18 added the enhancement New feature or request label Nov 3, 2021
@dracarys18
Copy link
Owner

Currently it just displays telegram webview whenever a tweet has an image or a video. It doesn't work every time and it's a very naive approach. I will reimplement that in a different way when I rewrite the bot.

@StephenBass
Copy link
Author

Thank you for the help, @dracarys18

@dracarys18
Copy link
Owner

Still need to think about this. I don't know what's the current media size limit in twitter. But Bot API has 50MB limit for sending the media.So might not be a good idea to send a whole file as the current implementation works well

@jayco12
Copy link

jayco12 commented Jul 15, 2022

my telegram bot is not yet pulling tweets from twoitter

@dracarys18
Copy link
Owner

my telegram bot is not yet pulling tweets from twoitter

Can you provide the logs that you are getting and the steps you followed to deploy the bot?

@jayco12
Copy link

jayco12 commented Jul 15, 2022

Building on the Heroku-20 stack-----> Using buildpack: emk/rust-----> Rust app detected-----> Checking for new releases of Rust stable channelinfo: checking for self-updates rustup unchanged - 1.25.1info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' stable-x86_64-unknown-linux-gnu unchanged - rustc 1.62.0 (a8314ef7d 2022-06-27)info: checking for self-updatesinfo: using existing install for 'stable-x86_64-unknown-linux-gnu'info: default toolchain set to 'stable-x86_64-unknown-linux-gnu' stable-x86_64-unknown-linux-gnu unchanged - rustc 1.62.0 (a8314ef7d 2022-06-27)-----> Building application using Cargo Compiling tweet_bot v0.1.0 (/tmp/build_2d8bb7ad)warning: associated function is never used: new --> src/error/tweet_error.rs:22:12 |22 | pub fn new(kind: TweetErrorKind) -> Self { | ^^^ | = note: #[warn(dead_code)] on by defaultwarning: function is never used: get_url_entity --> src/utils.rs:23:14 |23 | pub async fn get_url_entity(tweet: &Tweet) -> Option { | ^^^^^^^^^^^^^^warning: function is never used: get_media_urls --> src/utils.rs:34:14 |34 | pub async fn get_media_urls(tweet: &Tweet) -> Option<Vec> { | ^^^^^^^^^^^^^^warning: tweet_bot (bin "tweet_bot") generated 3 warnings Finished release [optimized] target(s) in 52.12s-----> Discovering process types Procfile declares types -> web, worker-----> Compressing... Done: 4.6M-----> Launching... Released v4 https://shielded-hollows-23459.herokuapp.com/ deployed to HerokuThis app is using the Heroku-20 stack, however a newer stack is available.To upgrade to Heroku-22, see:https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack

This is the log. The steps I followed are below.

I cloned your repository.
I logged into heroku.
I installed buildpack.
Changed key_sample.env to .env
I filled the details in.env
I pushed the code to heroku and put on dynos.

And when I checked my telegram bot it had not yet started

@jayco12
Copy link

jayco12 commented Jul 15, 2022

Or can I get an updated version of the code or a step by step video, please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants