Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Discussions > OpenSocial Application Development > Activities list returns 500 Internal Server Error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
shalafi  
View profile  
 More options Apr 25, 6:27 am
From: shalafi <shalafiraist...@gmail.com>
Date: Sat, 25 Apr 2009 03:27:30 -0700 (PDT)
Local: Sat, Apr 25 2009 6:27 am
Subject: Activities list returns 500 Internal Server Error
I've setup the osapi php client on my project.
I can for example query the logged user or his friends.

I'm using Google Friend Connect as my provider.

Like:
$batch=$this->osapi->newBatch();
$user_params=array(
        "userId"=>"@me", // query the logged user
        "groupId"=>"@self" // get logger users information
);
$batch->add($this->osapi->people->get($user_params),"self");
$response=$batch->execute(); // execute the job
$this->user=$response["self"]; // store the user for feature access
return $response["self"];

This works out for me.

The problem is that i can't read activities nor create one:

$batch=$this->osapi->newBatch();
$user_params=array(
                "userId"=>"@me", // query the logged user
                "groupId"=>"@self" // get logger users information
);
$batch->add($this->osapi->activities->get
($user_params),"userActivities");
$response=$batch->execute(); // execute the job
print_r($response);

the response is:

Array
(
    [userActivities] => osapiError Object
        (
            [errorCode:private] => 500
            [errorMessage:private] => <HTML>
<HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Internal Server Error</H1>
<H2>Error 500</H2>
</BODY>
</HTML>
            [response] =>
        )
)

Also trying to create one:

  // Create an activity (you could add osapiMediaItems to this btw)
  $batch=$this->osapi->newBatch();
  $activity = new osapiActivity(null, null);
  $activity->setTitle('osapi test activity at ' . time());
  $activity->setBody('osapi test activity body');
  $create_params = array(
      'userId' => "@me",
      'groupId' => '@self',
      'activity' => $activity
  );
  $batch->add($this->osapi->activities->create($create_params),
'createActivity');
  $result = $batch->execute();
  print_r($result);

  The response is:

Array
(
    [createActivity] => osapiError Object
        (
            [errorCode:private] => 400
            [errorMessage:private] =>

..
<H1>Bad Request</H1>
Your client has issued a malformed or illegal request.

Is it something with my code or the provider?


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shalafi  
View profile  
 More options Apr 28, 2:55 am
From: shalafi <shalafiraist...@gmail.com>
Date: Mon, 27 Apr 2009 23:55:46 -0700 (PDT)
Local: Tues, Apr 28 2009 2:55 am
Subject: Re: Activities list returns 500 Internal Server Error
Anybody that implemented activities successfully before? (REST & PHP)

On Apr 25, 11:27 am, shalafi <shalafiraist...@gmail.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Chabot Google employee  
View profile  
(1 user)  More options Apr 28, 3:40 pm
From: Chris Chabot <chab...@google.com>
Date: Tue, 28 Apr 2009 21:40:53 +0200
Local: Tues, Apr 28 2009 3:40 pm
Subject: Re: [OpenSocial] Re: Activities list returns 500 Internal Server Error

Hey Shalfi,

I've checked with the GFC team, and they mentioned that it needs the app id
to be set to '@app', but then it should work ok; Creating and retrieving
activities is supported by GFC.

Hope that helps!

   -- Chris


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shalafi  
View profile  
 More options Apr 29, 5:18 am
From: shalafi <shalafiraist...@gmail.com>
Date: Wed, 29 Apr 2009 02:18:00 -0700 (PDT)
Subject: Re: Activities list returns 500 Internal Server Error
thanks

 "appId"=>"@app"

made the trick


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Chabot Google employee  
View profile  
 More options Apr 29, 8:10 am
From: Chris Chabot <chab...@google.com>
Date: Wed, 29 Apr 2009 14:10:26 +0200
Local: Wed, Apr 29 2009 8:10 am
Subject: Re: [OpenSocial] Re: Activities list returns 500 Internal Server Error

Awesome, glad to hear it.

I'll make a mental note to add an example for that so others will have an
easier time at it

Thanks for the feedback,

   -- Chris


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google