 #   _id: (String) Player ID
 #   facebookId: (String) Player's Facebook ID
 #   fullName: (String) Player's full name
-#   firstName: (String) Player's first name
-#   gender: (String) Player's gender
+#   givenName: (String) Player's given name
+#   gender: (String) Player's gender, either "male" or "female"
 #   anonymousHash: (String) SHA3 hash of user's anonymous identifier
 # }
 #

    facebookAuthenticate: (facebookId, accessToken) ->
      # Only need to validate facebook token on the server
      result = Meteor.http.get "https://graph.facebook.com/me",
          params: {fields: "id", access_token: accessToken}
      responseUserId = JSON.parse(result.content)["id"]
      unless facebookId and responseUserId and responseUserId == facebookId
        die("Invalid access token!")


        # TODO(dthurn): Store other useful fields from facebook response here
        userId = noughts.Players.insert
          facebookId: responseUserId
          givenName: response["first_name"]
          fullName: response["name"]
          gender: response["gender"]
      this.setUserId(userId)
      return userId

