I'm trying to get user's info via Gem Koala Facebook API with below code
@graph = Koala::Facebook::API.new(auth_hash.credentials.token)
profile = @graph.get_object("me")
user.update(
url: auth_hash.extra.raw_info.id,
email: auth_hash.extra.raw_info.email,
friends: @graph.get_connections("me", "friends"),
birthday: @graph.get_object("me", "birthday")
)
friends: @graph.get_connections("me", "friends")
works perfectly fine, I will get a list of friends.
However birthday: @graph.get_object("me", "birthday")
will give me type: OAuthException, code: 2500, message: Unknown path components: /birthday [HTTP 400]
Things that returns arrays such as likes
, photos
works fine.
But strings such as last_name
, name
, first_name
will give me the same error.
What can I do to fix this? Is there something else I can enter instead of just birthday