You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ajay singh <aj...@tekritisoftware.com> on 2008/06/26 15:31:33 UTC
Connect shindig from SNS backend
Hi
Can any one please help me, I want to know-
How can I connect shindig to my SNS backend.
Thanks in advance
Ajay
Re: Connect shindig from SNS backend
Posted by Chris Chabot <ch...@xs4all.nl>.
The security token is an encrypted blob that holds information about
the app id, viewer, owner, etc..
It's included by the gadgets when making social information requests,
and the server uses it to validate that it indeed comes from a valid
gadget that has the authorization to query for information, and who's
and what gadget it is.
In other words when a gadget wants to retrieve the 'owner_friends',
the token tells the social data service who the owner is, and when a
gadget stores some application data, the token tells the back-end what
gadget id is making the request, etc ..
Even upon rendering of the gadget this token is used to retrieve that
information.. so all in all, it's an essential part of the under-water
communications between the social network site, the gadget renderer,
and the social data back-end; It adds security to it (hence the name
security token) by having a cryptographic validation of identity, and
provides information about who/what/etc.
Hope that clears it up a bit!
-- Chris
On Jul 11, 2008, at 7:44 AM, ajay singh wrote:
> Can aynyone help me about knowing the security token. What is the
> role of st in opensocial?
>
> Thanks
> Ajay
>
> ajay singh <aj...@tekritisoftware.com> wrote: Hi Chris
>
> Thank you very much for your guidence.
> I have started my work. If i face any problem i'll again disturb
> you :)
>
> Thanks
> Ajay
>
> Chris Chabot wrote: Hey Ajay,
>
> Your right, the documentation is a bit thin and scattered.
>
> Right now there are 2 ways in which shindig can deliver data to the
> gadgets, the 'old style' (custom json wire format), and the 'new
> style', which is the new RESTful API that's part of the 0.8
> specification. Unfortunately they both have slightly different data
> adapters (though the difference isn't that big)
>
> If your starting integration now, i would suggest using the new
> RESTful format, you will need it for 0.8 anyway.
>
> So what you do to use that and integrate it with your data back-end
> is:
> 1) Edit shindig/config/container.js, set "useRestful" : true
> 2) Create a php/config/local.php class and put something in like:
> 'people_service' => 'MyPeopleService',
> 'activity_service' => 'MyActivitiesService',
> 'app_data_service' => 'MyAppDataService',
> 'extension_class_paths' => '/path/on/disk/to/those/classes/'
>
> 3) Create MyPeopleService.php, MyActivitiesService.php,
> MyAppDataService.php in the /path/on/disk/to/those/classes/ folder
> (replace with a more sane location ofc:P)
>
> 4) Take a look at shindig/php/src/socialrest/samplecontainer/
> Basic{People,Activities,AppData}Server.php as an example of how these
> work. Those are basic XML file based examples, they miss a bit of the
> functionality you would want to have (like being able to filter on
> stuff like hasApp or topFriends, sorting, etc) and are really purely
> example files. However they show the API and what to return to shindig
> quite well.
>
> 5) Optionally you can also take a look at http://code.google.com/p/partuza/
> , an example social network site that uses shindig. It also implements
> those 3 service providers (see partuza/Shindig/
> Partuza{People,Activities,AppData}Service.php, and
> PartuzaDbFetcher.php for the db code behind it) but uses a 'real'
> database instead of an xml file. (ignore the PartuzaHandler.php file,
> thats for the 'old wire format' and won't be used for very long
> anymore)
>
> 6) Partuza also has a nice example of howto create the required
> container javascript for the basic {setTitle,resize,etc} services in
> html/js/container.js and how to create gadget iframe's with encrypted
> tokens in partuza/Application/Views/gadget/gadget.php
>
> Hope that will get you started!
>
> -- Chris
>
> On Jun 27, 2008, at 7:30 AM, ajay singh wrote:
>
>> Hi
>> My SNS is made in PHP, and i am using shindig php version.
>> I want to know how can i expose my api to the application
>> developer(like friend list and all), how can i connect shindig to my
>> sns.
>> No I havn't found any document. i have just read some emails.
>>
>> Thanks
>> Ajay
>>
>> Gonzalo Aune wrote: Can you give us more
>> information about your SNS ?, its made in Java?, PHP?,
>> did you read any documentation about Shindig?
>>
>> G.-
>>
>> On Thu, Jun 26, 2008 at 10:31 AM, ajay singh
>> wrote:
>>
>>> Hi
>>>
>>> Can any one please help me, I want to know-
>>> How can I connect shindig to my SNS backend.
>>>
>>> Thanks in advance
>>>
>>> Ajay
>>>
>>>
>>>
>>
>>
>>
>
>
>
>
>
>
>
Re: Connect shindig from SNS backend
Posted by ajay singh <aj...@tekritisoftware.com>.
Can aynyone help me about knowing the security token. What is the role of st in opensocial?
Thanks
Ajay
ajay singh <aj...@tekritisoftware.com> wrote: Hi Chris
Thank you very much for your guidence.
I have started my work. If i face any problem i'll again disturb you :)
Thanks
Ajay
Chris Chabot wrote: Hey Ajay,
Your right, the documentation is a bit thin and scattered.
Right now there are 2 ways in which shindig can deliver data to the
gadgets, the 'old style' (custom json wire format), and the 'new
style', which is the new RESTful API that's part of the 0.8
specification. Unfortunately they both have slightly different data
adapters (though the difference isn't that big)
If your starting integration now, i would suggest using the new
RESTful format, you will need it for 0.8 anyway.
So what you do to use that and integrate it with your data back-end is:
1) Edit shindig/config/container.js, set "useRestful" : true
2) Create a php/config/local.php class and put something in like:
'people_service' => 'MyPeopleService',
'activity_service' => 'MyActivitiesService',
'app_data_service' => 'MyAppDataService',
'extension_class_paths' => '/path/on/disk/to/those/classes/'
3) Create MyPeopleService.php, MyActivitiesService.php,
MyAppDataService.php in the /path/on/disk/to/those/classes/ folder
(replace with a more sane location ofc:P)
4) Take a look at shindig/php/src/socialrest/samplecontainer/
Basic{People,Activities,AppData}Server.php as an example of how these
work. Those are basic XML file based examples, they miss a bit of the
functionality you would want to have (like being able to filter on
stuff like hasApp or topFriends, sorting, etc) and are really purely
example files. However they show the API and what to return to shindig
quite well.
5) Optionally you can also take a look at http://code.google.com/p/partuza/
, an example social network site that uses shindig. It also implements
those 3 service providers (see partuza/Shindig/
Partuza{People,Activities,AppData}Service.php, and
PartuzaDbFetcher.php for the db code behind it) but uses a 'real'
database instead of an xml file. (ignore the PartuzaHandler.php file,
thats for the 'old wire format' and won't be used for very long anymore)
6) Partuza also has a nice example of howto create the required
container javascript for the basic {setTitle,resize,etc} services in
html/js/container.js and how to create gadget iframe's with encrypted
tokens in partuza/Application/Views/gadget/gadget.php
Hope that will get you started!
-- Chris
On Jun 27, 2008, at 7:30 AM, ajay singh wrote:
> Hi
> My SNS is made in PHP, and i am using shindig php version.
> I want to know how can i expose my api to the application
> developer(like friend list and all), how can i connect shindig to my
> sns.
> No I havn't found any document. i have just read some emails.
>
> Thanks
> Ajay
>
> Gonzalo Aune wrote: Can you give us more
> information about your SNS ?, its made in Java?, PHP?,
> did you read any documentation about Shindig?
>
> G.-
>
> On Thu, Jun 26, 2008 at 10:31 AM, ajay singh
> wrote:
>
>> Hi
>>
>> Can any one please help me, I want to know-
>> How can I connect shindig to my SNS backend.
>>
>> Thanks in advance
>>
>> Ajay
>>
>>
>>
>
>
>
Re: Connect shindig from SNS backend
Posted by ajay singh <aj...@tekritisoftware.com>.
Hi Chris
Thank you very much for your guidence.
I have started my work. If i face any problem i'll again disturb you :)
Thanks
Ajay
Chris Chabot <ch...@xs4all.nl> wrote: Hey Ajay,
Your right, the documentation is a bit thin and scattered.
Right now there are 2 ways in which shindig can deliver data to the
gadgets, the 'old style' (custom json wire format), and the 'new
style', which is the new RESTful API that's part of the 0.8
specification. Unfortunately they both have slightly different data
adapters (though the difference isn't that big)
If your starting integration now, i would suggest using the new
RESTful format, you will need it for 0.8 anyway.
So what you do to use that and integrate it with your data back-end is:
1) Edit shindig/config/container.js, set "useRestful" : true
2) Create a php/config/local.php class and put something in like:
'people_service' => 'MyPeopleService',
'activity_service' => 'MyActivitiesService',
'app_data_service' => 'MyAppDataService',
'extension_class_paths' => '/path/on/disk/to/those/classes/'
3) Create MyPeopleService.php, MyActivitiesService.php,
MyAppDataService.php in the /path/on/disk/to/those/classes/ folder
(replace with a more sane location ofc:P)
4) Take a look at shindig/php/src/socialrest/samplecontainer/
Basic{People,Activities,AppData}Server.php as an example of how these
work. Those are basic XML file based examples, they miss a bit of the
functionality you would want to have (like being able to filter on
stuff like hasApp or topFriends, sorting, etc) and are really purely
example files. However they show the API and what to return to shindig
quite well.
5) Optionally you can also take a look at http://code.google.com/p/partuza/
, an example social network site that uses shindig. It also implements
those 3 service providers (see partuza/Shindig/
Partuza{People,Activities,AppData}Service.php, and
PartuzaDbFetcher.php for the db code behind it) but uses a 'real'
database instead of an xml file. (ignore the PartuzaHandler.php file,
thats for the 'old wire format' and won't be used for very long anymore)
6) Partuza also has a nice example of howto create the required
container javascript for the basic {setTitle,resize,etc} services in
html/js/container.js and how to create gadget iframe's with encrypted
tokens in partuza/Application/Views/gadget/gadget.php
Hope that will get you started!
-- Chris
On Jun 27, 2008, at 7:30 AM, ajay singh wrote:
> Hi
> My SNS is made in PHP, and i am using shindig php version.
> I want to know how can i expose my api to the application
> developer(like friend list and all), how can i connect shindig to my
> sns.
> No I havn't found any document. i have just read some emails.
>
> Thanks
> Ajay
>
> Gonzalo Aune wrote: Can you give us more
> information about your SNS ?, its made in Java?, PHP?,
> did you read any documentation about Shindig?
>
> G.-
>
> On Thu, Jun 26, 2008 at 10:31 AM, ajay singh
> wrote:
>
>> Hi
>>
>> Can any one please help me, I want to know-
>> How can I connect shindig to my SNS backend.
>>
>> Thanks in advance
>>
>> Ajay
>>
>>
>>
>
>
>
Re: Connect shindig from SNS backend
Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Ajay,
Your right, the documentation is a bit thin and scattered.
Right now there are 2 ways in which shindig can deliver data to the
gadgets, the 'old style' (custom json wire format), and the 'new
style', which is the new RESTful API that's part of the 0.8
specification. Unfortunately they both have slightly different data
adapters (though the difference isn't that big)
If your starting integration now, i would suggest using the new
RESTful format, you will need it for 0.8 anyway.
So what you do to use that and integrate it with your data back-end is:
1) Edit shindig/config/container.js, set "useRestful" : true
2) Create a php/config/local.php class and put something in like:
'people_service' => 'MyPeopleService',
'activity_service' => 'MyActivitiesService',
'app_data_service' => 'MyAppDataService',
'extension_class_paths' => '/path/on/disk/to/those/classes/'
3) Create MyPeopleService.php, MyActivitiesService.php,
MyAppDataService.php in the /path/on/disk/to/those/classes/ folder
(replace with a more sane location ofc:P)
4) Take a look at shindig/php/src/socialrest/samplecontainer/
Basic{People,Activities,AppData}Server.php as an example of how these
work. Those are basic XML file based examples, they miss a bit of the
functionality you would want to have (like being able to filter on
stuff like hasApp or topFriends, sorting, etc) and are really purely
example files. However they show the API and what to return to shindig
quite well.
5) Optionally you can also take a look at http://code.google.com/p/partuza/
, an example social network site that uses shindig. It also implements
those 3 service providers (see partuza/Shindig/
Partuza{People,Activities,AppData}Service.php, and
PartuzaDbFetcher.php for the db code behind it) but uses a 'real'
database instead of an xml file. (ignore the PartuzaHandler.php file,
thats for the 'old wire format' and won't be used for very long anymore)
6) Partuza also has a nice example of howto create the required
container javascript for the basic {setTitle,resize,etc} services in
html/js/container.js and how to create gadget iframe's with encrypted
tokens in partuza/Application/Views/gadget/gadget.php
Hope that will get you started!
-- Chris
On Jun 27, 2008, at 7:30 AM, ajay singh wrote:
> Hi
> My SNS is made in PHP, and i am using shindig php version.
> I want to know how can i expose my api to the application
> developer(like friend list and all), how can i connect shindig to my
> sns.
> No I havn't found any document. i have just read some emails.
>
> Thanks
> Ajay
>
> Gonzalo Aune <go...@gmail.com> wrote: Can you give us more
> information about your SNS ?, its made in Java?, PHP?,
> did you read any documentation about Shindig?
>
> G.-
>
> On Thu, Jun 26, 2008 at 10:31 AM, ajay singh
> wrote:
>
>> Hi
>>
>> Can any one please help me, I want to know-
>> How can I connect shindig to my SNS backend.
>>
>> Thanks in advance
>>
>> Ajay
>>
>>
>>
>
>
>
Re: Connect shindig from SNS backend
Posted by ajay singh <aj...@tekritisoftware.com>.
Hi
My SNS is made in PHP, and i am using shindig php version.
I want to know how can i expose my api to the application developer(like friend list and all), how can i connect shindig to my sns.
No I havn't found any document. i have just read some emails.
Thanks
Ajay
Gonzalo Aune <go...@gmail.com> wrote: Can you give us more information about your SNS ?, its made in Java?, PHP?,
did you read any documentation about Shindig?
G.-
On Thu, Jun 26, 2008 at 10:31 AM, ajay singh
wrote:
> Hi
>
> Can any one please help me, I want to know-
> How can I connect shindig to my SNS backend.
>
> Thanks in advance
>
> Ajay
>
>
>
Re: Connect shindig from SNS backend
Posted by Gonzalo Aune <go...@gmail.com>.
Can you give us more information about your SNS ?, its made in Java?, PHP?,
did you read any documentation about Shindig?
G.-
On Thu, Jun 26, 2008 at 10:31 AM, ajay singh <aj...@tekritisoftware.com>
wrote:
> Hi
>
> Can any one please help me, I want to know-
> How can I connect shindig to my SNS backend.
>
> Thanks in advance
>
> Ajay
>
>
>