Package org.opensocial.data

Examples of org.opensocial.data.OpenSocialPerson


    if (token == null) {
      return null;
    }

    OpenSocialPerson viewer = null;
    OpenSocialClient client = new OpenSocialClient(
        OpenSocialProvider.valueOf("FRIENDCONNECT"));
    client.setProperty(OpenSocialClient.Property.TOKEN_NAME, "fcauth");
    client.setProperty(OpenSocialClient.Property.TOKEN, token);

    try {
      viewer = client.fetchPerson();
    } catch (OpenSocialRequestException e) {
      return null;
    } catch (IOException e) {
      return null;
    }

    User user = new User();
    user.setName(viewer.getDisplayName());

    return user;
  }
View Full Code Here

TOP

Related Classes of org.opensocial.data.OpenSocialPerson

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.