amitbatajoo / opensocial-java-client

Automatically exported from code.google.com/p/opensocial-java-client
Apache License 2.0
0 stars 0 forks source link

Library creates invalid JSON requests when updating appdata with some characters #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the following code against iGoogle:

OpenSocialClient c = new OpenSocialClient("google.com");

c.setProperty(OpenSocialClient.Properties.RPC_ENDPOINT,
"http://sandbox.gmodules.com/api/rpc");

c.setProperty(OpenSocialClient.Properties.CONSUMER_SECRET,
"uynAeXiWTisflWX99KU1D2q5");
c.setProperty(OpenSocialClient.Properties.CONSUMER_KEY,
"google.com:623061448914");
c.setProperty(OpenSocialClient.Properties.VIEWER_ID, "116872018614015227492");
data = "Link tag <a href=\"http://www.google.com\">Google</a>.";
c.updatePersonAppData("116872018614015227492","appdatatest",data);

Results in an error that the request does not have a valid security token.
However, using the same data string in the JS client updates successfully.

Original issue reported on code.google.com by api.dwh%...@gtempaccount.com on 23 Feb 2009 at 11:04

GoogleCodeExporter commented 9 years ago
I confirm this issue.
Also, please note that using a different string with no special character in it 
(e.g.
data = "appdata test value") will NOT result in this 401 error.

Original comment by ariel.va...@gmail.com on 24 Feb 2009 at 12:15

GoogleCodeExporter commented 9 years ago
Issue 11 has been merged into this issue.

Original comment by apijason...@gtempaccount.com on 18 Mar 2009 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by apijason...@gtempaccount.com on 21 Feb 2010 at 8:01