I tried printing my twitter friendlist.I have 112 friends but i am able to print screennames of only 20 friends. Is it because of some API limit/difference between friends and following/conceptual error.This is my code:
import tweepy
import sys
import time
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
data = api.get_user('')
count = 0
for friend in data.friends():
print 'Friend:'+ friend.screen_name
count=count+1
if count%5==0:
print count
time.sleep(20)
My interpreter is not throwing any error.