oops my bad. fixed the examples properly this time
This commit is contained in:
parent
024742d51b
commit
09cce11143
5 changed files with 5 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import twitter
|
||||
|
||||
""" Instantiate Twython with no Authentication """
|
||||
twitter = twitter.setup()
|
||||
twitter = twython.setup()
|
||||
trends = twitter.getCurrentTrends()
|
||||
|
||||
print trends
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import twitter
|
||||
|
||||
""" Instantiate Twython with no Authentication """
|
||||
twitter = twitter.setup()
|
||||
twitter = twython.setup()
|
||||
trends = twitter.getDailyTrends()
|
||||
|
||||
print trends
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import twitter
|
||||
|
||||
twitter = twitter.setup(authtype="Basic", username="example", password="example")
|
||||
twitter = twython.setup(authtype="Basic", username="example", password="example")
|
||||
mentions = twitter.getUserMentions(count="150")
|
||||
|
||||
print mentions
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import tango
|
||||
import twython
|
||||
|
||||
# Shortening URLs requires no authentication, huzzah
|
||||
twitter = tango.setup()
|
||||
twitter = twython.setup()
|
||||
shortURL = twitter.shortenURL("http://www.webs.com/")
|
||||
|
||||
print shortURL
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import tango
|
||||
|
||||
# Using no authentication and specifying Debug
|
||||
twitter = tango.setup(debug=True)
|
||||
|
||||
# Using Basic Authentication
|
||||
twitter = tango.setup(authtype="Basic", username="example", password="example")
|
||||
|
||||
# Using OAuth Authentication (Note: OAuth is the default, specify Basic if needed)
|
||||
auth_keys = {"consumer_key": "yourconsumerkey", "consumer_secret": "yourconsumersecret"}
|
||||
twitter = tango.setup(username="example", password="example", oauth_keys=auth_keys)
|
||||
Loading…
Add table
Add a link
Reference in a new issue