I'm trying to allow users that have connected their Facebook accounts to my rails app to find their Facebook friends that have already registered in the app, preferably in an index like format (similar to Formspring's display).
Currently I'm using Devise, OAuth+Fbook Javascript SDK, and Koala. I have the Facebook UID of each user that connects their Facebook saved in the db, but I don't know how to filter through the results of the Facebook API call @friends = @graph.get_connections("me", "friends") in order to display the users that have matching UID's to the API call data.
Any thoughts? There's probably an even better way, so lemme know if any additional info is needed. Thanks very much for your help!
EDIT (screenshot of index action in users controller)
Note in @oauth, app id and app secret are cropped out in the example image