You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to opensocial-cl...@googlegroups.com
Can you post the debug output? I'd like to see what's being sent in the request body. Also, are you using the library from trunk or the 20090402 package?
- Jason
Alabê Duarte
unread,
Oct 24, 2009, 2:41:34 PM10/24/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to opensocial-cl...@googlegroups.com
yes, I am using this package follows below the source code and the error log:
public static void main(String[] args) { OpenSocialClient c = new OpenSocialClient("orkut.com");
// orkut supports both the REST and RPC protocols; RPC is preferred // because // RPC supports batch requests c.setProperty(OpenSocialClient.Property.RPC_ENDPOINT, "http://sandbox.orkut.com/social/rpc");
// Credentials provided here are associated with the gadget located at // http://opensocial-resources.googlecode.com/svn/samples/rest_rpc/sample.xml; // If you install this gadget, you can substitute your own OpenSocial ID // for the one used below and fetch your profile data and friends c.setProperty(OpenSocialClient.Property.CONSUMER_SECRET, "uynAeXiWTisflWX99KU1D2q5"); c.setProperty(OpenSocialClient.Property.CONSUMER_KEY, "orkut.com:623061448914"); c.setProperty(OpenSocialClient.Property.VIEWER_ID, "10886451842774632785");
try { // Retrieve the friends of the specified user using the // OpenSocialClient // method fetchFriends Collection<OpenSocialPerson> friends = c.fetchFriends();
System.out.println("----------");
// The fetchFriends method returns a typical Java Collection object // with // all of the methods you're already accustomed to like size() System.out.println(friends.size() + " friends:");
// Iterate through the Collection for (OpenSocialPerson friend : friends) { // Output the name of the current friend System.out.println("Nickname: " + friend.getDisplayName()); System.out.println("Id: " + friend.getId()); for (int i = 0; i < friend.fieldNames().length; i++) { System.out.println("field: " + friend.fieldNames()[i]); }
if (friend.hasField("GENDER")) { // valor de um campo texto simples System.out.println("Gênero: " + friend.getField("GENDER").getStringValue()); } if (friend.hasField("AGE")) { // valor de um campo texto simples System.out.println("Idade: " + friend.getField("AGE").getStringValue()); }
at org.opensocial.client.OpenSocialBatch.send(OpenSocialBatch.java:102) at org.opensocial.client.OpenSocialClient.fetchPeople(OpenSocialClient.java:440)
at org.opensocial.client.OpenSocialClient.fetchFriends(OpenSocialClient.java:190) at org.opensocial.client.OpenSocialClient.fetchFriends(OpenSocialClient.java:184) at org.opensocial.client.OpenSocialClient.fetchFriends(OpenSocialClient.java:162) at com.OpenSocial.DisplayFriends.main(DisplayFriends.java:49)