code: public T groups_get(Integer userId, Collection<Long> groupIds)
      throws FacebookException, IOException {
      boolean hasGroups = (null != groupIds && !groupIds.isEmpty());
      if (null != userId)
        return hasGroups ?
               this.callMethod(FacebookMethod.GROUPS_GET, new Pair<String, CharSequence>("uid", userId.toString()),
                               new Pair<String, CharSequence>("gids", delimit(groupIds))) :
               this.callMethod(FacebookMethod.GROUPS_GET, new Pair<String, CharSequence>("uid", userId.toString()));
      else
        return hasGroups ?
               this.callMethod(FacebookMethod.GROUPS_GET, new Pair<String, CharSequence>("gids", delimit(groupIds))) :
               this.callMethod(FacebookMethod.GROUPS_GET);
    }
docs: Retrieves the groups associated with a user
  @param userId Optional: User associated with groups.
  A null parameter will default to the session user.
  @param groupIds Optional: group ids to query.
  A null parameter will get all groups for the user.
  @return array of groups