Commit 1fd1d244 authored by Aaron Hill's avatar Aaron Hill
Browse files

Update 'Getting Started' page

parent 4753c1a9
......@@ -18,21 +18,19 @@ Hello Tweepy
.. code-block :: python
import tweepy
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
public_tweets = tweepy.api.public_timeline()
public_tweets = api.home_timeline()
for tweet in public_tweets:
print tweet.text
This example will download the public timeline tweets and print each
one of their texts to the console. tweepy.api in the above code
snippet is an unauthenticated instance of the tweepy API class. The
API class contains all the methods for access the Twitter API. By
unauthenticated means there is no user associated with this
instance. So you may only do unauthenticated API calls with this
instance. For example the following would fail::
tweepy.api.update_status('will not work!')
This example will download your home timeline tweets and print each
one of their texts to the console. Twitter requires all requests to
use OAuth for authentication.
The :ref:`auth_tutorial` goes into more details about authentication.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment