コード例 #1
0
 /**
  * Returns the error message returned from Facebook.
  *
  * @return the error message returned from Facebook
  */
 public String getErrorMessage() {
   if (errorMessage != null) {
     return errorMessage;
   } else {
     return exception.getLocalizedMessage();
   }
 }
コード例 #2
0
  @Override
  public void startStream() {

    client = getFacebookClient();

    if (configuration.getInfo() != null && configuration.getInfo().size() > 0) {
      for (String id : configuration.getInfo()) {
        executor.submit(new FacebookFeedPollingTask(this, id));
      }
      running.set(true);
    } else {
      try {
        String id = client.getMe().getId();
        executor.submit(new FacebookFeedPollingTask(this, id));
        running.set(true);
      } catch (FacebookException e) {
        LOGGER.error(e.getMessage());
        running.set(false);
      }
    }
  }