1 / 19

OpenSocial - PowerPoint PPT Presentation

  • Updated On :

OpenSocial. Creating Orkut Applications. Before We Start…. If you have any questions, please don't hesitate to ask. During presentation we will create a sample application and run at Orkut. This session is not about OpenSocial container/Shindig. About Me. Doing PHP since 2000.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'OpenSocial' - Pat_Xavi

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Opensocial l.jpg


Creating Orkut Applications

Before we start l.jpg
Before We Start…

  • If you have any questions, please don't hesitate to ask.

  • During presentation we will create a sample application and run at Orkut.

  • This session is not about OpenSocial container/Shindig.

About me l.jpg
About Me

  • Doing PHP since 2000.

  • Service Delivery Manager

    @ Clarion Technologies Pvt. Ltd.

    CMMI Level 3 Company

  • My application “Cities I visited” listed at Orkut directory.

Something about you l.jpg
Something about you…

  • How many of you know OpenSocial?

  • How many of you used Facebook Applications?

  • How many of you used Orkut Applications?.

Why opensocial l.jpg
Why OpenSocial?

  • Facebook has its own API. It became popular with launch of applications.

  • There are many other networking sites like Orkut, MySpace, hi5, linkedin etc.

  • What if all creates their own API? Developer will have to create different application for each platform.

What is opensocial l.jpg
What is OpenSocial?

OpenSocial defines a common API for social applications across multiple websites. Built from standard JavaScript and HTML, developers can create apps with OpenSocial that access a social network's friends and update feeds.

Journey of opensocial l.jpg
Journey of OpenSocial

  • Launched on November 1, 2007 with initial version 0.5

  • Initially supported by Friendster, hi5, MySpace, Ning, orkut and many more.

  • At launch Flixster, FotoFlexer, iLike, Newsgator, RockYou, Slide, Theikos, and VirtualTourist presented applications.

  • Current version 0.8 released on May 28, 2008.

Basics l.jpg

Simple “Hello World” Application (helloworld.xml)

<?xml version="1.0" encoding="UTF-8" ?>


<ModulePrefs title="Hello World!">

<Require feature="opensocial-0.8" />


<Content type="html">

<![CDATA[ Hello, world!]]>



Listing friends 1 xml l.jpg
Listing Friends …1 - xml

<?xml version="1.0" encoding="UTF-8"?>


<ModulePrefs title=“PHPCamp- List Friends">

<Require feature="opensocial-0.7"/>


<Content type="html">

<![CDATA[ <script type="text/javascript"> /* ... */ </script>

<div id='main'>

Your friends: <div id='friends'></div>


]]> </Content> </Module>

Listing friends 2 js l.jpg
Listing Friends … 2- js

<script language=“JavaScript”>


function init() {

var req = opensocial.newDataRequest();

var opt_params = {};

opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 20;

req.add(req.newFetchPeopleRequest('OWNER_FRIENDS',opt_params), 'ownerFriends');




Listing friends 3 js l.jpg
Listing Friends … 3- js

function onLoadFriends(data) {

var viewerFriends = data.get('viewerFriends').getData();

var html="";


viewerFriends.each(function(person) {

var friend_thumbnail = person.getField(opensocial.Person.Field.THUMBNAIL_URL);

html +='<li>' + person.getDisplayName() + '<img src="'+friend_thumbnail+'"> </li>';


html +='</ul>';

document.getElementById('friends').innerHTML = html;


What else you can do l.jpg
What else you can do

  • Send request to your server and return information in text,XML or JSON format.

  • Insert activity in users updates.

  • Use of AJAX.

  • Store information at Orkut server.

  • Fetch owner and his friends information.

What you can t do l.jpg
What you can’t do

  • Post scraps through your application.

  • Fetch personal information like phone number, birth date etc.

  • Communicate between different OpenSocial sites.

  • Any change at Orkut site. Application runs only at the space allocated to it e.g. profile view and container view.

  • Run exactly same application on all supported sites.

References l.jpg

  • Orkut OpenSocial Blog

  • Orkut Developer Forum

  • Orkut developer Guide

  • OpenSocial Tutorial

That s it l.jpg
That’s it!

  • If you have any questions, don't hesitate to ask.

  • Demonstration scripts and forms can be seen under

  • Feel free to contact me at