Rails & Mogli - get users friends' ids
I'm using Rails 3 & mogli to connect to facebook. This code get's me a user object.
client = Mogli::Client.new(session[:at])
user = Mogli::User.find("me", client)
I've seen from the documentation that mogli has classes for all the object types. (EG: albums, events, etc) But i don't know how to retrieve connections. (EG: friends)
Basically i need to get a list of the user's friends with their id's. Because user.friends
is only a开发者_Python百科n array of their names.
Any ideas?
err. i feel stupid. @user.friends
is an array of Mogli::User
objects. @user.friends.inpect
was calling to_str
on them automatically.
精彩评论