Hi I''m trying to build a new facebook app. I want to keep a database of the friends of friends for each user. what''s the best way to store and maintain such a graph ? thanks Gady -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ewanmcdougall-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Mar-10 20:58 UTC
Re: social graph
Hi Gady, There was an interesting article in February''s edition on Linux Journal (166) about Rails and Facebook API integration. http://www.linuxjournal.com/article/9924 They suggested a few of resources http://wiki.developers.facebook.com/index.php/Using_Ruby_on_Rails_with_Facebook_Platform http://rfacebook.rubyforge.org/ http://www.chadfowler.com/2007/9/5/writing-apis-to-wrap-apis Cheers, Ewan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Gady Sujo wrote:> Hi > I''m trying to build a new facebook app. > I want to keep a database of the friends of friends for each user. > what''s the best way to store and maintain such a graph ?I imagine if you have a table of just the friends of each user (columns: user_id, friend_user_id), you can get the collection of friends of friends of each user. Something like: select u.* from user u, friends f1, friends f2 where f2.user_id = :given_user_id and f2.friend_user_id = f1.user_id and f1.friend_user_id = u.id and Stephan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---