In [4]:
import tweepy

In [5]:
auth = tweepy.OAuthHandler('H4NpEvHhW6Vaxky75j7StiEdx', 'mtEcqJaw0IAGcqsn2a6wXaEzVfyx3enxPKozVxNNVohitlJudX')
auth.set_access_token('2821347210-GeOgtqt9PcYP1Msc7nvdHro9bEdROOHUiAIJV4f', 'VwAjPJ82VmxsGDpxUfoeEjUKnSIq9uBeBfUGLTAE44GJf')

api = tweepy.API(auth)

public_tweets = api.home_timeline()
for tweet in public_tweets:
    print tweet.text


RT @DShankar: Why hasn't someone made this? It's the perfect VR motion rig! 😂 via @SuB8u http://t.co/CYHDpLkBIs
One commenter says he's solved our #Linux command-line challenge in just 76 characters. Can you beat it? http://t.co/4sSzqolwf5
RT @MakingLyst: First the code. Now the blog. 'Searching for Approximate Nearest Neighbours' by a @Maciej_Kula http://t.co/1kW8WWUWMj
RT @Alexbateman1: @lenovere What we need is 10 simple rules for chairing a session http://t.co/gHqvxigN4Z
RT @timjph: Interested in Docker containers for bioinformatics? Registration for Docker Symposium in London now open http://t.co/fNYrSEyfGv…
RT @alanmcn1: I have 290 individual gene aligns. Anyone know how to concatenate into 1 big alignment? Failing miserably with existing tools
RT @mitsuhiko: So fun thing: you cannot start a tweet with "D. Tusk". Gives an internal server error. Yay in-band signalling.
RT @BioMickWatson: Cpipe appears to be GATK best practices implemented in Bpipe: http://t.co/k7O2HvWE0j
Devs don't always need to reinvent the wheel. Why decoupling CMS components is a good idea: http://t.co/IUFLtDTGkr
RT @rjekker: Still looking to resell my early bird #europython ticket. Anyone interested?
Saturday night in Wellington aka another bloody Google mindmap thingy https://t.co/jwmK1wiT1p
RT @morrisonnorman: Posted my slides at #BOSC2015 "Research Shared: http://t.co/XcAZ687elW" http://t.co/66uk6clQLN
build more software
RT @adamwarski: Client-side sessions for #Akka-http https://t.co/GyG5Jd1Qp3 #Scala
Amazon Starts Building 208 MW Wind Farm In North Carolina http://t.co/aYlcaYxzW1 via @techcrunch
RT @philipbstark: Line-caught salmon, weeds, and feral plums. #putAWeedOnIt #urbanforaging @osfood http://t.co/iy3SFTdeNv
RT @katyhuff: Today it was pretty cool to stumble across @UCBIDS colleague @philipbstark on @nytimes with Mark Bittman! http://t.co/7AtMgVM…
And tbh what I got pales into insignificance to what those who present more 'other' than I get
Been an up and down day, gonna try to ignore the being ranted at by racists bit and focus on the good stuff instead
Governments may not have been good at software development in the past, but open source is changing the equation: http://t.co/dBayR3hJvS

In [7]:
api.update_status(str('testing tweepy'))


---------------------------------------------------------------------------
TweepError                                Traceback (most recent call last)
<ipython-input-7-e53ae616a261> in <module>()
----> 1 api.update_status(str('testing tweepy'))

/usr/local/lib/python2.7/dist-packages/tweepy/api.pyc in update_status(self, media_ids, *args, **kwargs)
    191             allowed_param=['status', 'in_reply_to_status_id', 'lat', 'long', 'source', 'place_id', 'display_coordinates'],
    192             require_auth=True
--> 193         )(post_data=post_data, *args, **kwargs)
    194 
    195     def media_upload(self, filename, *args, **kwargs):

/usr/local/lib/python2.7/dist-packages/tweepy/binder.pyc in _call(*args, **kwargs)
    237             return method
    238         else:
--> 239             return method.execute()
    240 
    241     # Set pagination mode

/usr/local/lib/python2.7/dist-packages/tweepy/binder.pyc in execute(self)
    187                                                 proxies=self.api.proxy)
    188                 except Exception as e:
--> 189                     raise TweepError('Failed to send request: %s' % e)
    190                 rem_calls = resp.headers.get('x-rate-limit-remaining')
    191                 if rem_calls is not None:

TweepError: Failed to send request: data must be a byte string

In [ ]:


In [ ]:


In [ ]:


In [ ]: