iilv,
Another way to auto-follow is to use the Social Graph API methods.

For instance you could set up a script to run periodically that does
the following:

1) download all of a user's friends' ID's through the friends/ids
method and store them in a data structure
2) download all of the user's followers' IDs through the followers/ids
method and store them in the data structure
3) perform a diff on these two data structures, finding all follower
ids not currently in the friend id list.
4) follow the follower ids from step 3 with the friendships/create method

This circumvents the parsing of new follower emails. The trade off is
that it is not real-time since the script has to be run at periodic
intervals.

Hope that helps.

Doug Williams
@dougw
do...@igudo.com

On Wed, Feb 25, 2009 at 4:47 PM, TjL <luo...@gmail.com> wrote:
>
> Well, you can't auto-follow when someone sends you a DM, because you
> have to ALREADY be following someone in order to get a DM.
>
> You can auto-follow when someone starts to follow you.
>
> If you are familiar with procmail, you can auto-follow using the recipe below.
>
> (If you are not familiar with procmail, please delete and ignore. It's
> beyond my scope to teach and not every mail server supports it.)
>
>
>
> :0ci
> * ^X-Twitteremailtype: is_following
> * ^From: ....@postmaster\.twitter\.com
> * ^Subject: .* is now following you on Twitter!
> * ^X-Twittersenderscreenname: \/[^ ]+
> | curl    --netrc -s \
>                --data POST \
>                "http://twitter.com/friendships/create/$MATCH.xml"; >/dev/null
>
> Note that you MUST have your twitter credentials stored in ~/.netrc
> for this to work in a format like this:
>
> machine twitter.com
>        login YourTwitternameHere
>        password SeKrEt
>
> Also note that this doesn't do any error-checking to make sure that
> the auto-follow has worked.
>
> FWIW
>
> TjL



--
Doug Williams

do...@igudo.com
http://www.igudo.com

Reply via email to