raspberry-pi-news

Taking and Tweeting a Photo with Raspberry Pi @Raspberry_Pi #piday #raspberrypi

February 15, 2014 Jessica

NewImage

Raspi.tv has posted part 4 of their pi twitter app series and this week the lesson is how to take a tweet photos using your pi.

Today it gets a bit more exciting. We’re going to take a photo with the Raspberry Pi camera and tweet it.

These are basic building blocks for manipulating a twitter account from your Raspberry Pi. So what do we need to know about tweeting photos?

The maximum photo file size you can upload to a tweet is 3Mb. This is plenty for the kind of photos I’m thinking about. I’m going to use 1024 x 768 pixels, which is adequate resolution for twitter. It’s a lot less than the Pi camera is capable of, but you can tweak it in your script if you want to use the full 3Mb allowance.

Unfortunately, although tweepy is quite a good Python library, its documentation is rather out of date. I had no idea how to tweet a photo, but last week I happened across a post by Dougie Lawson on the Raspberry Pi Forums (Python section). This gave me most of what I needed to be able to tweet a photo.

Read more.


998Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!