Package com.google.code.facebookapi.schema

Examples of com.google.code.facebookapi.schema.UsersGetInfoResponse


    FacebookJaxbRestClient client = FacebookSessionTestUtils.getValidClient( FacebookJaxbRestClient.class );

    long logged = client.users_getLoggedInUser();
    List<Long> users = Collections.singletonList( logged );
    EnumSet<ProfileField> fields = EnumSet.allOf( ProfileField.class );
    UsersGetInfoResponse response = client.users_getInfo( users, fields );

    String name = response.getUser().get( 0 ).getName();

    Assert.assertNotNull( name );
    Assert.assertNotSame( "", name );
  }
View Full Code Here


    List<Long> friends = response.getUid();

    // Go fetch the information for the user list of user ids
    client.users_getInfo( friends, EnumSet.of( ProfileField.NAME ) );

    UsersGetInfoResponse userResponse = (UsersGetInfoResponse) client.getResponsePOJO();

    // Print out the user information
    List<User> users = userResponse.getUser();
    for ( User user : users ) {
      assertNotNull( user.getName() );
    }
  }
View Full Code Here

  @Test
  public void test_getUserMusic() throws Exception {
    FacebookJaxbRestClient client = FacebookSessionTestUtils.getValidClient( FacebookJaxbRestClient.class );
    long uid = client.users_getLoggedInUser();
    Set<CharSequence> fields = new HashSet<CharSequence>( Arrays.asList( "uid", "music" ) );
    UsersGetInfoResponse response = client.users_getInfo( Arrays.asList( uid ), fields );
    User user = response.getUser().get( 0 );
    System.out.println( "music:" + user.getMusic() );
    // System.out.println( "music-raw:" + client.getRawResponse() );
  }
View Full Code Here

TOP

Related Classes of com.google.code.facebookapi.schema.UsersGetInfoResponse

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.