- import twitter
- from t import ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET, CONSUMER_KEY, CONSUMER_SECRET
-
- api = twitter.Api(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET)
-
Return twitter search results for a given term
- term
- count, default 15, maximum 100
- raw_query, a raw query as a string
- since_id, returns results with an ID greater than the specified ID
- max_id, returns only statuses with an ID less than or equal to the specified ID
- until, returns tweets generated since the given date
- geocode, geolocation within which to search for tweets
- searches = api.GetSearch(term='valdosta state', count= 100)
-
- searches = api.GetSearch(raw_query="q=valdosta%20state&result_type=recent&since=2014-07-19&count=100")
-
- searches = api.GetSearch(term='valdosta', since_id = 1193364932055711745)
-
- searches = api.GetSearch(term='valdosta', max_id = 1193364932055711745)
-
- searches = api.GetSearch(term='valdosta state', until='2019-11-09') #YYYY-MM-DD
-
- searches = api.GetSearch(term='FSU', geocode = [30.4433237, -84.2777568, "1mi"], result_type="recent", count=100)
-
- #user_id, twitter id
- #screen_name, twitter name
- users = api.GetFriends() #fetch the follower
-
- user = users[0]
- print(user)
-