Facebook - Vershynin
-
Upload
igor-bronovskyy -
Category
Technology
-
view
542 -
download
0
description
Transcript of Facebook - Vershynin
Про що поговоримо
• Потенціал та можливості платформи• Основи побудови аплікацій• Використання можливостей платформи• Приклади готових аплікацій
Платформа Facebook
Користувачі Facebook
Архітектура аплікації
Архітектура аплікації
Візуальні компоненти 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.
Facebook Graph API
Приклад 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«
}
Персональна інформаціяЗвернувшись до сторінки 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().
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.
Приклад використання 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); }
});
Можливі методи використання аплікацій
• Незалежні аплікації• Аплікації для сторінок
Будь-яка аплікація може бути додана до сторінки і реалізовувати свої функції по різному.
Приклади готових аплікацій
Факти