import time
import tweepy
from authenticate_twitter import authenticate_user

# == OAuth Authentication ==
#
# This mode of authentication is the new preferred way
# of authenticating with Twitter.

# The consumer keys can be found on your application's Details
# page located at https://dev.twitter.com/apps (under "OAuth settings")
#consumer_key="hhYq78kZ6VkAp4Q4pXzuKCOkA"
#consumer_secret="A468W3FnFd9WcL2PXYeRO0iLWnu90761HkKHijXRXqmgtR1bpk"

# The access tokens can be found on your applications's Details
# page located at https://dev.twitter.com/apps (located
# under "Your access token")
#access_token="374363728-BCe1rusHWiVPBHDCQ5RoketbfaNePuHXTeJja7W6"
#access_token_secret="cMyNaQwVzxtXKqSG0jjlI1H6avEoMbvZ36pB7Zr5dPEN0"

#auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
#auth.secure = True
#auth.set_access_token(access_token, access_token_secret)
#"mitchrichmond23"
#api = tweepy.API(auth)
#api = authenticate_user()

ids = []

def find_followers(api,name):
	for page in tweepy.Cursor(api.followers_ids, screen_name = name).pages():
    		ids.extend(page)
    		time.sleep(20)
	return ids
