Package com.restfb.types

Examples of com.restfb.types.Comment$Media


   *     the content url
   * @return a {#link=Content} object
   */
  public Content getContent(String contentURL) {
    String fbid = URLUtils.getFbId(contentURL);
    Comment comment = getFbClient().getFacebookObjectByID(fbid, Comment.class);
   
    Content content = comment2Content(comment);
    content.setContentUrl(contentURL);
   
    return content;
View Full Code Here


  }

  public void testGetContent() throws IOException {
    String contentUrl = "facebook/accessTokenKey/fbid/comment";

    Comment expectedComment = loadObjectFromJSON("/examples/comment.json",
        Comment.class);

    // expected behavior
    expect(mockFbClient.getFacebookObjectByID("fbid", Comment.class))
        .andReturn(expectedComment);
View Full Code Here

    LOG.info("Start getTime");
    Long time = null;
    if (mentionId != null) {
      Post p = facebookClient.fetchObject(mentionId, Post.class);
      if (p == null) {
        Comment c = facebookClient
            .fetchObject(mentionId, Comment.class);
        if (c == null) {
          LOG.info("Facebook object [" + mentionId
              + "] is not a valid post/comment");
        } else {
          LOG.info("Facebook object [" + mentionId + "] is comment");
          time = c.getCreatedTime() == null ? null : c
              .getCreatedTime().getTime() / 1000L;
        }
      } else {
        LOG.info("Facebook object [" + mentionId + "] is post");
        time = p.getCreatedTime() == null ? null : p.getCreatedTime()
View Full Code Here

TOP

Related Classes of com.restfb.types.Comment$Media

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.