Package com.restfb

Examples of com.restfb.Connection


public class PostSearchITCase extends RestFbIntegrationTestBase {

  @Test
  public void tesPostSearchV1_0() {
    DefaultFacebookClient facebookClient = new DefaultFacebookClient(getAccessToken(), Version.VERSION_1_0);
    Connection publicSearch =
        facebookClient.fetchConnection("search", Post.class, Parameter.with("q", "watermelon"),
          Parameter.with("type", "post"));

    assertNotNull(((Post) publicSearch.getData().get(0)).getMessage());
  }
View Full Code Here


  }

  @Test(expected = FacebookOAuthException.class)
  public void tesPostSearchV2_0() {
    DefaultFacebookClient facebookClient = new DefaultFacebookClient(getAccessToken(), Version.VERSION_2_0);
    Connection publicSearch =
        facebookClient.fetchConnection("search", Post.class, Parameter.with("q", "watermelon"),
          Parameter.with("type", "post"));

    fail("facebook should not allow this public search");
  }
View Full Code Here

TOP

Related Classes of com.restfb.Connection

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.