Arne,
Thanks for the quick response.
I'm not sure I understand how to use the security token. I see the
security token in the javascript:
google.friendconnect.container.initOpenSocialApi({
site: 'XXXXXXXXXXXXXXX',
onload: function(securityToken) { }
});
...but I don't know where I'd get it from in php client.
It's not urgent to get this implemented...it can certainly wait until
next week. I'll watch this space to see how you progress with the
FCAuth approach.
Thanks again for your help,
T
On Jun 5, 11:24 am, Arne Roomann-Kurrik <
api.kur...@google.com> wrote:
> Hi Tim,
>
> 2 legged OAuth is used to make requests on behalf of the site and not
> a specific user. When you authenticate in this way, there's no means
> to determine the currently logged in user, so any requests that need a
> user's context (anything that uses @me, for example) won't work.
>
> The PHP client supports explicitly setting a user context for 2-legged
> by passing an additional parameter:
> $auth = new osapiOAuth2Legged("<consumer key>", "<consumer secret>,
> <user ID>");
>
> but since you won't have the user's ID this won't work.
>
> The suggested way of doing this is to use either a security token:
http://code.google.com/apis/friendconnect/opensocial_rest_rpc.html#ga...
> or the fcauth token:
http://code.google.com/apis/friendconnect/opensocial_rest_rpc.html#si...
> both of which provide a user context for requests, so "@me" stuff
> works with either of these approaches.
>
> FCAuth is a much better way to perform this kind of request than the
> security token, but it's not supported directly in the PHP client
> right now. Security tokens are possible in the PHP client though:
http://code.google.com/p/opensocial-php-client/wiki/HowToConnecting#S...