Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tweet photo with twitter gem

Is it possible to tweet a photo with the twitter gem in rails?

I know you can do regular text, like below

Twitter.update("I'm tweeting with @gem!")

But how do I include an image url that gets uploaded?

Thank you

like image 557
user749798 Avatar asked Jun 29 '13 14:06

user749798


1 Answers

Assuming you're talking about the Twitter gem by sferik, I think this method here might be helpful. http://rdoc.info/gems/twitter/Twitter/API/Tweets#update_with_media-instance_method Basically you want to use the update_with_media method. More information from Twitter is on their site https://dev.twitter.com/docs/api/1/post/statuses/update_with_media. Hope that helps!

like image 141
Matt McNaughton Avatar answered Sep 28 '22 03:09

Matt McNaughton