Can anyone please convert this short little python script to PHP. I had a go at it myself with no luck
Code:
#!/usr/bin/python
#(c) 2009 Ben McIlwain, released under the terms of the GNU GPL v3.
import twitter
from sets import Set
username = 'username_here'
password = 'password_here'
api = twitter.Api(username=username, password=password)
following = api.GetFriends()
friendNames = Set()
for friend in following:
friendNames.add(friend.screen_name)
followers = api.GetFollowers()
for follower in followers:
if (not follower.screen_name in friendNames):
api.CreateFriendship(follower.screen_name)
Thank You!
|