How to use the twython.core function in twython

To help you get started, we’ve selected a few twython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github propublica / politwoops-tweet-collector / bin / telegraaf.py View on Github external
def get_ids(names):
    twitter = twython.core.setup(username='breyten', password='a0p7i2n5')
    return twitter.bulkUserLookup(screen_names=names)
github ryanmcgrath / twython / examples / search_results.py View on Github external
import twython.core as twython

""" Instantiate Tango with no Authentication """
twitter = twython.setup()
search_results = twitter.searchTwitter("WebsDotCom", rpp="50")

for tweet in search_results["results"]:
	print tweet["text"]
github ryanmcgrath / twython / examples / get_friends_timeline.py View on Github external
import twython.core as twython, pprint

# Authenticate using Basic (HTTP) Authentication
twitter = twython.setup(username="example", password="example")
friends_timeline = twitter.getFriendsTimeline(count="150", page="3")

for tweet in friends_timeline:
	print tweet["text"]
github ryanmcgrath / twython / examples / twython_setup.py View on Github external
import twython.core as twython

# Using no authentication
twitter = twython.setup()

# Using Basic Authentication (core is all about basic auth, look to twython.oauth in the future for oauth)
twitter = twython.setup(username="example", password="example")
github ryanmcgrath / twython / examples / rate_limit.py View on Github external
import twython.core as twython

# Instantiate with Basic (HTTP) Authentication
twitter = twython.setup(username="example", password="example")

# This returns the rate limit for the requesting IP
rateLimit = twitter.getRateLimitStatus()

# This returns the rate limit for the requesting authenticated user
rateLimit = twitter.getRateLimitStatus(rate_for="user")
github ryanmcgrath / twython / examples / get_user_mention.py View on Github external
import twython.core as twython

twitter = twython.setup(username="example", password="example")
mentions = twitter.getUserMentions(count="150")

print mentions
github ryanmcgrath / twython / examples / twython_setup.py View on Github external
import twython.core as twython

# Using no authentication
twitter = twython.setup()

# Using Basic Authentication (core is all about basic auth, look to twython.oauth in the future for oauth)
twitter = twython.setup(username="example", password="example")