Social supports the OpenSocial standard. So you can integrate OpenSocial gadgets in your dashboard and use the RPC or REST service to view or publish the social data.
With the support for the OpenSocial standard, Social provides a framework for developers to build gadgets that can display and mash up activity information for contacts, social networks, applications and services.

Gadgets {anchor:id=Developer_document.Open_social.Gadget} are web-based software components based on HTML, CSS, JavaScript; defined by using an XML declaration syntax. They allow developers to easily write social applications that work on the social networks supporting OpenSocial APIs without modification. See the following links for detailed information:

* [Gadgets Specification v1.1|http://opensocial-resources.googlecode.com/svn/spec/1.1/Social-Gadget.xml]

* [OpenSocial Core Gadget Specification v1.1|http://opensocial-resources.googlecode.com/svn/spec/1.1/Core-Gadget.xml]


To know how to create an OpenSocial gadget, see [here|http://wiki.opensocial.org/index.php?title=Gadget_Developer's_Guide].

{note}
Gadgets will work out of the box on Dashboard. In eXo, gadgets are wrapped by GadgetWrapperPortlet so they can work as any other portlet applications. 
At present, Social supports [OpenSocial Specification v1.1| http://opensocial-resources.googlecode.com/svn/spec/1.1/OpenSocial-Specification.xml].
{note}

h1. Supported APIs {anchor:id=Developer_document.Open_social.Supported_APIs}
Social leverages [Apache Shindig|http://shindig.apache.org/overview.html] - an OpenSocial reference implementation to provide and extend OpenSocial APIs which is compatible with the common OpenSocial APIs which is supported by other big social networks like [Ning|http://www.ning.com], [Hi5|http://www.hi5.com], [Orkut|http://www.orkut.com] and more.

To get more details about Supported APIs, refer to [OpenSocial Specification|http://docs.opensocial.org/display/OSD/Specs].

{docbook}
<para xml:id="Developer_document.Open_social.REST-RPC_API">
<citetitle>
<emphasis role="bold">
REST/RPC API
</emphasis>
</citetitle>
</para>
{docbook}

Suppose that you are running the local host at port 8080 (http://localhost:8080/), the path of the API will be:

* REST API:
http://localhost:8080/social/social/rest

* RPC API:
http://localhost:8080/social/social/rpc

To learn what you can do with the APIs, have a look at the [specification|http://opensocial-resources.googlecode.com/svn/spec/1.0/Social-Data.xml]. If you are developing in Java, you can use the [opensocial-java-client|http://code.google.com/p/opensocial-java-client/].


{docbook}
<para xml:id="Developer_document.Open_social.Configure_the_security">
<citetitle>
<emphasis role="bold">
Configure the security
</emphasis>
</citetitle>
</para>
{docbook}

If you are using OpenSocial, you need to configure the OAuth authentication. With the case of eXo Platform, you need to edit the file: _gatein/conf/portal/portal/configuration.xml_ and add the following configuration:
{code:xml}<component>
  <key>org.exoplatform.social.opensocial.oauth.ServiceProviderStore</key>
  <type>org.exoplatform.social.opensocial.oauth.ServiceProviderStore</type>
  <init-params>
    <properties-param>
      <name>grails-book-flow</name>
      <description>consumer key and secret for sample oauth provider. </description>
      <property name="consumerKey" value="YOUR_KEY_HERE" />
      <property name="sharedSecret" value="YOUR_SECRET_KEY_HERE" />
    </properties-param>
  </init-params>
</component>{code}

_consumerKey_ and _sharedSecret_ are keys that need to be shared with the application which is doing the request.

{docbook}
<para xml:id="Developer_document.Open_social.Publish_an_activity_into_a_space">
<citetitle>
<emphasis role="bold">
Publish an activity into a space
</emphasis>
</citetitle>
</para>
{docbook}

This functionality is not available in the standard OpenSocial APIs.

Instead of publishing your activities to the group @self as usual, you will publish them to the group "space:spaceId" or "space:spacePrettyName".

After using the OpenSocial Java library and Groovy, your code will look like this:

{code:groovy}  def client = getOpenSocialClient()

  //create your new activity
  Activity activity = new Activity()
activity.body = "xx purchased the book xxx"
  activity.title = "BookFlow Purchased"

  //prepare the request that will create the activity
  Request request = ActivitiesService.createActivity(activity);
  //specify that the creation of this new activity is for the space bookflow
  request.groupId = "space:bookflow";

  client.send(request);{code}

In the example above, the groupId is set to "space:bookflow" and bookflow is the name of the space. 

{docbook}
<para xml:id="Developer_document.Open_social.Tutorial">
<prompt>
   <emphasis role="bold">See also</emphasis>
</prompt>
</para>
{docbook}

* See [Grails + Social tutorial.|http://www.exoplatform.com/company/public/website/resource-viewer?path=/website/Content%20types/Tutorial/grails-exo-social]
