Liferay Portal can publish its applications to other websites in a variety of formats. These range from simple widgets to standards like OpenSocial. This lets you provide your application or content in the context of another website, easily. Read on to find out how this is done.
Sharing OpenSocial Gadgets
OpenSocial consists of a set of APIs for social networking. It may be beneficial for you to share applications from your Liferay Portal server with other sites, such as ighome.com or igoogleportal.com. These sites let users customize their own pages with gadgets. Liferay Portal users can share their applications on any OpenSocial-compatible site. Let’s try this now.
For our example, we’ll share Liferay Portal’s Blogs app:
Add the Blogs app to your Liferay Portal page.
Click the app’s Options icon () and select Configuration.
In the Sharing tab, open the OpenSocial Gadget section.
Set the selector to YES for Allow users to add Blogs to an OpenSocial platform. In the OpenSocial Gadget URL field, replace
localhost:8080with the name of your public domain and port.
Close the dialog and click the app’s Options icon (). There’s a new option available named Add to an OpenSocial Platform. Select this option to add the app to a page on an OpenSocial platform.
By going through this process, Liferay Portal shared the your app’s URL to the OpenSocial platform. The URL you provided is unique to your specific instance of the app. This lets you share multiple instances of the same app as different Gadgets.
You can use this sharing capability to let users view what’s happening on your site at a glance.