()
| 41 | |
| 42 | |
| 43 | def initialize_api(): |
| 44 | ck = "your_consumer_key" |
| 45 | cks = "your_consumer_key_secret" |
| 46 | at = "your_access_token" |
| 47 | ats = "your_access_token_secret" |
| 48 | |
| 49 | auth = tweepy.OAuthHandler(ck, cks) |
| 50 | auth.set_access_token(at, ats) |
| 51 | api = tweepy.API(auth) |
| 52 | user = api.me() |
| 53 | return api, user |
| 54 | |
| 55 | |
| 56 | def main(): |