How to select the friends of a friend

Aug 31, 2009 at 10:37 PM

Hi (again),

 

Hello! I know, I'm getting boring...

 

But..., anyone knows how to select the friends of my friends?

To be more precise: how can I select only my friends who also follow certain User I follow?

 

Thanks.. (again.. :) ).

Coordinator
Sep 1, 2009 at 4:45 AM

Hi,

Here's the approach I would take:

1. Query User for your friends and materialize the results.

2. Query User for your followers and materialize the results.

3. For each of your friends, query User for their followers and materialize those followers.

4. When you get the followers for each friend, as specified in step #3, use the Intersect operator to get a list of common users.

No problem. It's good to see how people are using LINQ to Twitter, which helps me find and fix problems that people are having.

Joe

Sep 1, 2009 at 7:40 PM
JoeMayo wrote:

Hi,

Here's the approach I would take:

1. Query User for your friends and materialize the results.

2. Query User for your followers and materialize the results.

3. For each of your friends, query User for their followers and materialize those followers.

4. When you get the followers for each friend, as specified in step #3, use the Intersect operator to get a list of common users.

No problem. It's good to see how people are using LINQ to Twitter, which helps me find and fix problems that people are having.

Joe

 

Hmm..

I thought it might be a way using a single query. But if there is no way I'll follow your advice. Thanks again. Congratulations on the project.