public APINodeList nextPage()

in templates/java/src/main/java/com/facebook/ads/sdk/APINodeList.java [66:95]


    public APINodeList<T> nextPage(int limit) throws APIException {
      // First check if 'next' url is retured. If so, always use the it.
      if (this.next != null) {
        // App secret won't return with the 'next' URL. Need to append it
        // for paging.
        if (this.appSecret == null) {
          this.request.setOverrideUrl(this.next);
        } else {
          try {
            URL a = new URL(this.next);
            String connector = a.getQuery() == null ? "?" : "&";
            this.request.setOverrideUrl(
              this.next +
              connector +
              "appsecret_proof=" +
              this.appSecret
            );
          } catch (java.net.MalformedURLException e) {
            return null;
          }
        }
        return (APINodeList<T>) request.execute();
      }
      if (after == null) return null;
      this.request.setOverrideUrl(null);
      Map<String, Object> extraParams = new HashMap<String, Object>();
      if (limit > 0) extraParams.put("limit", limit);
      extraParams.put("after", after);
      return (APINodeList<T>) request.execute(extraParams);
    }