Re: [twitter-dev] Best way to auto-discover new followers
A method via the streaming API to get friendship / follower updates would be nice. Now it may be better to use the users/followers method instead of followers/ids. The reason is this is ordered from newest to oldest based on when the user followed you. So you would start paginating from the start and keep going until you reach a known follower. At that point you should have a list of all new followers. You would still need to scan the entire follower list to find unfollows (if you need that info). Josh On Sat, Mar 13, 2010 at 1:31 PM, Zero zeroh...@qoobly.com wrote: I currently need to auto-discover new people who have started following me. Here's how I do it: 1. Periodically pull in my followers using '/followers/ids.json'. 2. Compare to my list of known ids to find new ids. The slight downside of this is it seems somewhat inefficient (for twitter). If there was access to an event stream of follow/unfollow requests this would be much easier. It also seems like it could be done with less latency. That is, if I have a lot of followers, I'm not going to want to burden the system by fetching the whole list at a high frequency. However, if I were just fetching the latest follows, it seems like I could do this at a higher frequency and not affect twitter. Questions: 1. Is there a better way to do what I want with existing API? 2. Are there emerging features that could make this better? Thanks, Zero
Re: [twitter-dev] Best way to auto-discover new followers
Oh and also the benefit of users/followers is it includes all the user information. If you are just maintaining a social graph of ids, then pulling down all the ids via followers/ids would be the way to go. I think for most users this just requires a few requests. Josh On Sun, Mar 14, 2010 at 9:42 AM, Josh Roesslein jroessl...@gmail.comwrote: A method via the streaming API to get friendship / follower updates would be nice. Now it may be better to use the users/followers method instead of followers/ids. The reason is this is ordered from newest to oldest based on when the user followed you. So you would start paginating from the start and keep going until you reach a known follower. At that point you should have a list of all new followers. You would still need to scan the entire follower list to find unfollows (if you need that info). Josh On Sat, Mar 13, 2010 at 1:31 PM, Zero zeroh...@qoobly.com wrote: I currently need to auto-discover new people who have started following me. Here's how I do it: 1. Periodically pull in my followers using '/followers/ids.json'. 2. Compare to my list of known ids to find new ids. The slight downside of this is it seems somewhat inefficient (for twitter). If there was access to an event stream of follow/unfollow requests this would be much easier. It also seems like it could be done with less latency. That is, if I have a lot of followers, I'm not going to want to burden the system by fetching the whole list at a high frequency. However, if I were just fetching the latest follows, it seems like I could do this at a higher frequency and not affect twitter. Questions: 1. Is there a better way to do what I want with existing API? 2. Are there emerging features that could make this better? Thanks, Zero
Re: [twitter-dev] Best way to auto-discover new followers
Thanks for the tip, I do have to augment the information by fetching the user info with a second call, so this will eliminate all that messiness. On Sun, Mar 14, 2010 at 7:45 AM, Josh Roesslein jroessl...@gmail.comwrote: Oh and also the benefit of users/followers is it includes all the user information. If you are just maintaining a social graph of ids, then pulling down all the ids via followers/ids would be the way to go. I think for most users this just requires a few requests. Josh On Sun, Mar 14, 2010 at 9:42 AM, Josh Roesslein jroessl...@gmail.comwrote: A method via the streaming API to get friendship / follower updates would be nice. Now it may be better to use the users/followers method instead of followers/ids. The reason is this is ordered from newest to oldest based on when the user followed you. So you would start paginating from the start and keep going until you reach a known follower. At that point you should have a list of all new followers. You would still need to scan the entire follower list to find unfollows (if you need that info). Josh On Sat, Mar 13, 2010 at 1:31 PM, Zero zeroh...@qoobly.com wrote: I currently need to auto-discover new people who have started following me. Here's how I do it: 1. Periodically pull in my followers using '/followers/ids.json'. 2. Compare to my list of known ids to find new ids. The slight downside of this is it seems somewhat inefficient (for twitter). If there was access to an event stream of follow/unfollow requests this would be much easier. It also seems like it could be done with less latency. That is, if I have a lot of followers, I'm not going to want to burden the system by fetching the whole list at a high frequency. However, if I were just fetching the latest follows, it seems like I could do this at a higher frequency and not affect twitter. Questions: 1. Is there a better way to do what I want with existing API? 2. Are there emerging features that could make this better? Thanks, Zero