open social overview for students

50
OpenSocial for Students By Rohit Ghatol From Pune Google Technology User Group http://pune-gtug.blogspot.com

Upload: rohit-ghatol

Post on 13-Jan-2015

1.440 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Open social overview for students

OpenSocial for Students

By Rohit Ghatol

From

Pune Google Technology User Group

http://pune-gtug.blogspot.com

Page 2: Open social overview for students

What is Pune-GTUG?

GTUG stands for Google Technology User Group

Page 3: Open social overview for students
Page 4: Open social overview for students

http://pune-gtug.blogspot.com

Page 5: Open social overview for students

What is OpenSocial?

Page 6: Open social overview for students

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.

Page 7: Open social overview for students

Before we answer that lets understand what social networking sites do?

Can you name some of the social networking sites?

Page 8: Open social overview for students

Social Networking Sites

Page 9: Open social overview for students

What do you do on these sites?

We socialize and do some activity on these sites!

Page 10: Open social overview for students

What do you do on these sites?

We connect and do some activity on these sites!

Music

Page 11: Open social overview for students

What do you do on these sites?

We connect and do some activity on these sites!

Scrapbook

Page 12: Open social overview for students

What do you do on these sites?

We connect and do some activity on these sites!

Professional Recommendations

Page 13: Open social overview for students

What do you do on these sites?

We socialize and do some activity on these sites!

And so on…..

Page 14: Open social overview for students

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?

Page 15: Open social overview for students

How do we socialize objectsonline

without having to create yetanother social network?

Page 16: Open social overview for students
Page 17: Open social overview for students
Page 18: Open social overview for students
Page 19: Open social overview for students
Page 20: Open social overview for students
Page 21: Open social overview for students

OpenSocial

A common open set of APIs for building social applications across

multiple sites

Page 22: Open social overview for students

This is NOT GoogleSocial. It’s about making the Web more social,

not just Google.

Page 23: Open social overview for students
Page 24: Open social overview for students
Page 25: Open social overview for students
Page 26: Open social overview for students

Standards-based

html+javascript+REST+OAuth

Page 27: Open social overview for students

Lets see some examples

Page 28: Open social overview for students
Page 29: Open social overview for students
Page 30: Open social overview for students
Page 31: Open social overview for students
Page 32: Open social overview for students
Page 33: Open social overview for students

Back to the original Question

What is OpenSocial?

Page 34: Open social overview for students

What is OpenSocial?

When you write an Application for a OpenSocial Container (e.g Orkut) it – gives you access to your Friends

Page 35: Open social overview for students
Page 36: Open social overview for students

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)

Page 37: Open social overview for students
Page 38: Open social overview for students

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

Page 39: Open social overview for students

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.

Page 40: Open social overview for students

Roles in OpenSocial

• Container – Sites which have OpenSocial Features like Orkut

• User – Who use these sites

• Developer – Who develop applications for OpenSocial Sites

Page 41: Open social overview for students

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>

Page 42: Open social overview for students

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>

Page 43: Open social overview for students

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);

}

Page 44: Open social overview for students

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('');

}

Page 45: Open social overview for students

Why OpenSocial?

• Developer : Distribution to 275 Million people• Containers : More Features• User : More Applications

Page 46: Open social overview for students

Why OpenSocial?

When you develop an application-• How do you bring people to your application?

OR

• Do you take your application to people?

Page 47: Open social overview for students

Questions?

?

Page 48: Open social overview for students

Links

• OpenSocial - http://code.google.com/apis/opensocial/

Page 49: Open social overview for students

References

• OpenSocial Presentation from Google IO 2008• OpenSocial Site at code.google.com

Page 50: Open social overview for students

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