The problem with the security token was that my application is
actually a web game loaded in orkut app via iframe and on that iframe
I'm passing to variables with javascript. The first variable is
orkutId and the second one is the security token which I'm getting by:
var API_TOKEN = shindig.auth.getSecurityToken(); I need to use those
two variables in order to have auto login in the game. The security
token needs to be urlencoded because it contains characters like: = /
+  and the problem was that I didn't code it in the javascript before
passing this parameter to the iframe src. I've made a function for
urlencode in javascript and after passing it to the iframe I've made
in the php urldecode and by that action the problem with the security
token was solved, but now I'm getting error by the php library: Bad
Request Error 400.

Here is my php code:
                $orkutId = intval($_GET['orkutId']);
                $token = urldecode($_GET['token']);

                $provider = new osapiOrkutProvider();
                $provider->rpcEndpoint = null;
                $auth = new osapiSecurityToken( $token );
                $osapi = new osapi($provider, $auth);

                $params = array(
                        'userId' => $orkutId,
                        'groupId' => "@self",
                        'fields' => "@all",
                );
                $request = $osapi->people->get($params);
                $batch = $osapi->newBatch();
                $batch->add($request, 'request_label');
                $result = $batch->execute();

Does anyone have a clue on this issue ?

Thanks in advance


On May 24, 7:27 am, Sachin Shenoy <therealsac...@gmail.com> wrote:
> The "Bad, bad server! No donut for you." error on clicking "more" is known
> issue.
>
> I am not able to reproduce the bad security token error though? Are you
> still facing it?
>
> Regards,
> Sachin
>
> On Fri, May 21, 2010 at 12:50 PM, Tsvetomir Demerdjiev 
> <tset...@gmail.com>wrote:
>
>
>
> > In my application in sandbox I'm getting Malformed security token
> > although I've tried log out and log in, deleting cache and cookies
> > (nothing helped) and when I go to my profile page on the link "more"
> > the message for the bad server appears again. I'm guessing  those
> > issues are from problems with the server because yesterday  everything
> > was working ok
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Orkut Developer Forum" group.
> > To post to this group, send email to opensocial-or...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > opensocial-orkut+unsubscr...@googlegroups.com<opensocial-orkut%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/opensocial-orkut?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Orkut Developer Forum" group.
> To post to this group, send email to opensocial-or...@googlegroups.com.
> To unsubscribe from this group, send email to 
> opensocial-orkut+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/opensocial-orkut?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.

Reply via email to