open social overview for students
DESCRIPTION
TRANSCRIPT
OpenSocial for Students
By Rohit Ghatol
From
Pune Google Technology User Group
http://pune-gtug.blogspot.com
What is Pune-GTUG?
GTUG stands for Google Technology User Group
http://pune-gtug.blogspot.com
What is OpenSocial?
What is OpenSocial?
OpenSocial defines a common API for social applications across multiple websites. With standard JavaScript and HTML, developers can create apps that access a social network's friends and update feeds.
Before we answer that lets understand what social networking sites do?
Can you name some of the social networking sites?
Social Networking Sites
What do you do on these sites?
We socialize and do some activity on these sites!
What do you do on these sites?
We connect and do some activity on these sites!
Music
What do you do on these sites?
We connect and do some activity on these sites!
Scrapbook
What do you do on these sites?
We connect and do some activity on these sites!
Professional Recommendations
What do you do on these sites?
We socialize and do some activity on these sites!
And so on…..
Jaiku’s 5 rules for social networks
1. What is your object?
2. What are your verbs?
3. How can people share the objects?
4. What is the gift in the invitation?
5. Are you charging the publishers or the spectators?
How do we socialize objectsonline
without having to create yetanother social network?
OpenSocial
A common open set of APIs for building social applications across
multiple sites
This is NOT GoogleSocial. It’s about making the Web more social,
not just Google.
Standards-based
html+javascript+REST+OAuth
Lets see some examples
Back to the original Question
What is OpenSocial?
What is OpenSocial?
When you write an Application for a OpenSocial Container (e.g Orkut) it – gives you access to your Friends
What is OpenSocial?
When you write an Application for a OpenSocial Container (e.g Orkut) it – gives you access to your Friends– allows you to read write updates (Activity Stream)
What is OpenSocial?
When you write an Application for a OpenSocial Container (e.g Orkut) it – gives you access to your Friends– allows you to read write updates (Activity Stream)– allows you to store and share some information
with your friends
What is OpenSocial?
It turns sites like Orkut into a platform for developers to write more applications and allows users to install these on top of Orkut
So along with scrapping you can now interact with your friends in a number of ways. Chat with them, play games with them, plan your hangout places, all without leaving Orkut.
Roles in OpenSocial
• Container – Sites which have OpenSocial Features like Orkut
• User – Who use these sites
• Developer – Who develop applications for OpenSocial Sites
Code Samples
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Hello World!">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html">
<h1>Hello World</h1>
</Content>
</Module>
Code Samples
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Hello World!">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html">
<!– Your HTML Javascript goes here -->
</Content>
</Module>
Code Samples
function loadFriends() {
var req = opensocial.newDataRequest(); //Create a request to orkut
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER), 'viewer'); //Tell I want to get the Viewer
req.add(req.newFetchPeopleRequest(opensocial.newIdSpec({ "userId" : "VIEWER", "groupId" : "FRIENDS" });), 'viewerFriends');//Tell I want to get the Viewer’s Friends
req.send(onLoadFriends);
}
Code Samples
function onLoadFriends(data) {
var viewer = data.get('viewer').getData();
var viewerFriends = data.get('viewerFriends').getData();
html = new Array();
html.push('<ul>');
viewerFriends.each(function(person) {
if (person.getId()) {
html.push('<li>' + person.getDisplayName() + "</li>");
}
});
html.push('</ul>');
document.getElementById('friends').innerHTML = html.join('');
}
Why OpenSocial?
• Developer : Distribution to 275 Million people• Containers : More Features• User : More Applications
Why OpenSocial?
When you develop an application-• How do you bring people to your application?
OR
• Do you take your application to people?
Questions?
?
Links
• OpenSocial - http://code.google.com/apis/opensocial/
References
• OpenSocial Presentation from Google IO 2008• OpenSocial Site at code.google.com
Disclaimer
• The social networking site Orkut is used in many slides, just for the reason, that the audience is very familiar with this site.
• This presentation has no indentation to highlight one social networking site over other