amitbatajoo / opensocial-java-client

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

Only activities for the current application can be accessed or modified - 403 #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pass 3 legged auth dance to orkut - some modification required on 
orkutSandBox Object.
This is the constructor after my modifications:

public OrkutSandboxProvider(boolean useRest) {
    super();

    setName("orkut");
    setVersion("0.8");
    setRestEndpoint("http://sandbox.orkut.com/social/rest/");
    if (!useRest) {
      setRpcEndpoint("http://sandbox.orkut.com/social/rpc/");
    }

    setAuthorizeUrl("https://www.google.com/accounts/OAuthAuthorizeToken");
    setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
    setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken");
    addRequestTokenParameter("scope", "http://sandbox.orkut.gmodules.com/social/rest");

  }

2. Create activity and send it.
    Activity activity = new Activity();
    activity.setBody(body);
    activity.setTitle(title);
    client.send(ActivitiesService.createActivity(activity));

3.

What is the expected output? What do you see instead?
I expected that the activity creation will pass successfully, instead I am 
getting null pointer exception:
java.lang.NullPointerException
    at org.opensocial.Response.parseRestResponse(Response.java:85)
    at org.opensocial.Client.submitRestRequest(Client.java:200)
    at org.opensocial.Client.send(Client.java:153)
    at org.opensocial.Client.send(Client.java:108)

also, I checked the response received and I found:
<HTML>
<HEAD>
<TITLE>Only activities for the current application can be accessed or 
modified</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Only activities for the current application can be accessed or modified</H1>
<H2>Error 403</H2>
</BODY>
</HTML>

What version of the product are you using? On what operating system?
version 1.0, windows xp, tomcat 6.

Please provide any additional information below.

Original issue reported on code.google.com by orentja...@gmail.com on 12 Jul 2010 at 7:12