Facebook - Vershynin

15
Facebook, як платформа соціальних аплікацій Аудиторія: розробники Євген Вершинін, 2011 yvershynin@softjourn. com

description

IT Event 2011 Spring

Transcript of Facebook - Vershynin

Page 1: Facebook - Vershynin

Facebook, як платформа соціальних аплікацій

Аудиторія: розробники

Євген Вершинін, [email protected]

Page 2: Facebook - Vershynin

Про що поговоримо

• Потенціал та можливості платформи• Основи побудови аплікацій• Використання можливостей платформи• Приклади готових аплікацій

Page 3: Facebook - Vershynin

Платформа Facebook

Page 4: Facebook - Vershynin

Користувачі Facebook

Page 5: Facebook - Vershynin

Архітектура аплікації

Page 6: Facebook - Vershynin

Архітектура аплікації

Page 7: Facebook - Vershynin

Візуальні компоненти Facebook (Social Plugins)

We are in the process of deprecating FBML. If you are building a new application on Facebook.com, please implement your application using

HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML. While there is still functionality that we have not ported over yet, we are no longer adding new features to FBML.

Page 8: Facebook - Vershynin

Facebook Graph API

Page 9: Facebook - Vershynin

Приклад Graph API запитуEvery object in the social graph has a unique ID. You can access the properties of an object by

requesting https://graph.facebook.com/ID. For example, the official page for the Facebook Platform has id 19292868552, so you can fetch the object at https://graph.facebook.com/19292868552:

{ "name": "Facebook Platform", "type": "page", "website": "http://developers.facebook.com", "username": "platform", "founded": "May 2007", "company_overview": "Facebook Platform enables anyone to build...", "mission": "To make the web more open and social.", "products": "Facebook Application Programming Interface (API)...", "fan_count": 449921, "id": 19292868552, "category": "Technology«

}

Page 10: Facebook - Vershynin

Персональна інформаціяЗвернувшись до сторінки https://graph.facebook.com/yvershynin де yvershynin це скорочена

назва моєї сторінки на Facebook або https://graph.facebook.com/792367662 де 792367662 це мій ID в Facebook, отримаємо однакові дані:

{ "id": "792367662", "name": "Yevgen Vershynin", "first_name": "Yevgen", "last_name": "Vershynin", "link": "http://www.facebook.com/yvershynin", "username": "yvershynin", "gender": "male", "locale": "ru_RU“

}

Які в подальшому можна перетворити в об’єкт або масив за допомогою Javascript function eval() or PHP function json_decode().

Page 11: Facebook - Vershynin

Facebook SDKs

JavaScript SDK The JavaScript SDK enables you to access all of the features of the Graph API and Dialogs via JavaScript. It provides a rich set of client-side functionality for authentication and rendering the XFBML versions of our Social Plugins.

iOS SDK (iPhone & iPad) The iOS SDK provides first-class Facebook Platform support for iPhone, iPad and iPod Touch apps written in Objective-C. You can utilize single-sign-on, call the Graph API and display Platform Dialogs.

Android SDK Our Android SDK brings the Facebook Platform to the Android Platform (mobile & devices). You can use this SDK to add single-sign-on to your Android apps, invoke the Graph API and more.

PHP SDK This SDK provides Facebook Platform support to your PHP-based web apps. This library helps you add Facebook Login and Graph API support to your Website.

Page 12: Facebook - Vershynin

Приклад використання JavaScript SDK

Опублікувати запис на стіні

var body = ‘Hello people! Welcome at IT Event ‘11'; FB.api('/me/feed', 'post', { message: body },

function(response) { if (!response || response.error) {

alert('Error occured'); } else {

alert('Post ID: ' + response.id); }

});

Page 13: Facebook - Vershynin

Можливі методи використання аплікацій

• Незалежні аплікації• Аплікації для сторінок

Будь-яка аплікація може бути додана до сторінки і реалізовувати свої функції по різному.

Page 14: Facebook - Vershynin

Приклади готових аплікацій

Page 15: Facebook - Vershynin

Факти