Using tweepy to follow people tweeting a specific hashtag
<p>This is one of my first python projects and I'm using Tweepy to trying to search for a specific hashtag and follow those people tweeting that hashtag.  I don't understand why this doesn't work and I've tried to append followers to  list but nothing either.  I've read the tweepy docs and this is what I've come up with:</p>

<pre><code>import tweepy 
import time

auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
api = tweepy.API(auth)

for follower in tweepy.Cursor(api.search, q="#kenbone").items():
    api.create_friendship(screen_name = follower)
    print(follower) 
</code></pre>

<p>Want you are getting in your loop, the variable <code>follower</code>, is a <code>user</code> object with a huge lot of information about the user, and not just a name as you seem to believe. To get the screen name of a <code>user</code> object, use <code>follower.screen_name</code>:</p>

<pre><code>api.create_friendship(screen_name = follower.screen_name)
</code></pre>

python for-loop tweepy