1. Trang chủ
  2. » Công Nghệ Thông Tin

An-Pratical-Approach-Social-Network-Platforms pdf

36 264 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề An Practical Approach to Social Network Platforms
Tác giả PyCo13
Năm xuất bản 2011
Định dạng
Số trang 36
Dung lượng 1,87 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Page 4 An Introduction To Facebook DevelopmentBeginning Facebook Development • Beginning with Facebook Development, you must know the following core concepts:  Setup an new facebook ap

Trang 1

An Pratical Approach to Social Network Platform

Revision: 1.00

Released: 2011/08/5

Author: PyCo13

Trang 2

Page 2 An Introduction To Facebook Development

Trang 3

THE FIRST LOOK TO SOCIAL NETWORK

Trang 4

Page 4 An Introduction To Facebook Development

Beginning Facebook Development

Beginning with Facebook Development, you must know the

following core concepts:

 Setup an new facebook application.

 Facebook authentication.

 Graph API.

 Open graph protocol.

 Social plugins.

Trang 5

Setup Facebook Development

Trang 6

Page 6 An Introduction To Facebook Development

Setup Facebook Application

Steps to begin developing facebook application:

Validate your phone

Create Application

Configure Application

Get back application

parametersChoose right Facebook

SDK

Trang 7

Validate your mobile phone

Validate your phone

http://www.facebook.com/update_security_info.ph

p

Trang 8

Page 8 An Introduction To Facebook Development

Create facebook application

Validate your phone

Create Application

http://www.facebook.com/developers/createapp.ph

p

Trang 10

Page 10 An Introduction To Facebook Development

Get back application’s parameters

Validate your phone

Trang 11

Choose right facebook sdk

Validate your phone

Create ApplicationConfigure Application

Get back application

(http://code.google.com/p/facebook-• Java java-sdk/)

(http://code.google.com/p/facebook-The list is endless …

Trang 12

Facebook Platform

Authentication

The Graph API

Facebook Query Language

Open Graph Protocol

Social Plugins

Trang 13

Facebook Authentication

Facebook Platform supports two different OAuth 2.0 flows for

user login:

 server-side (know as the authentication code flow in the specification)

 client-side (known as the implicit flow).

Facebook’s implementation of the OAuth 2.0 involves three

different steps: user authentication, app authorization and app

authentication.

http://developers.facebook.com/docs/authentication/permissions

/

 Read Permissions: email, user_likes, user_photos, friends_events

 Write Permission: publish_stream, create_event, offline_access

 Page Permison: manage_pages

Trang 14

Page 14 An Introduction To Facebook Development

Facebook Authentication

Trang 15

Facebook Authentication – Server Side Flow

Trang 16

Page 16 An Introduction To Facebook Development

Facebook Authentication – Client Side Flow

Trang 17

The Graph API

The Graph API provide interface for interacting with objects and connections in the

Facebook social graph.

Every objects in social graph has a unique ID.

The Graph API uses OAuth 2.0 for authorization - access_token .

Trang 18

Page 18 An Introduction To Facebook Development

The Graph API

Trang 19

The Graph API

Trang 20

Page 20 An Introduction To Facebook Development

The Graph API

Ex1: get basic user information

Trang 21

The Graph API

Ex2: select some field on your returned data

Trang 22

Page 22 An Introduction To Facebook Development

The Graph API

Ex3: get users friends list

Trang 23

The Graph API

Ex4: limit your query results

http://graph.facebook.com/kidhunter/? limit=3

{

"data": [

{"name": "Hung Le Thanh", "id": “12345678"},

{ “name": "Tuan Pham", "id": “12572288" }

Trang 24

Page 24 An Introduction To Facebook Development

The Graph API

Ex5: search people

Trang 25

Facebook Query Language

Allows you to use a SQL-style interface to more easily query the

same Facebook social data that you can access through other Facebook API methods.

Some key FQL Tables

Trang 26

Page 26 An Introduction To Facebook Development

FQL

Queries are of the form

FROM clause can contain only a single table.

can use the IN keyword in SELECT or WHERE clauses to do

subqueries, but subqueries cannot reference variables in the outer query's scope.

• Queries properties that are marked as indexable.

FQL can handle simple math, basic boolean operators, AND or

NOT logical operators, and ORDER BY and LIMIT clauses.

SELECT [fields] FROM [table] WHERE [conditions]

Trang 27

FQL

Trang 28

Page 28 An Introduction To Facebook Development

Trang 29

Open Graph Protocol

The Open Graph Protocol enables you to integrate your Web

pages into the social graph.

Including Open Graph tags on your Web page, makes your

page equivalent to a Facebook Page.

Trang 30

Page 30 An Introduction To Facebook Development

Open Graph Protocol

Facebook scrape our page:

 every 24 hours

 an admin for the Open Graph page clicks the Like button

 URL is entered into the Facebook URL Linter

Open graph protocol require four properties, two additional:

Trang 31

Open Graph Protocol - Example

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:og="http://ogp.me/ns#"

xmlns:fb="http://www.facebook.com/2008/fbml">

<head>

<title>The Rock (1996)</title>

<meta property="og:title" content="The Rock"/>

<meta property="og:type" content="movie"/>

<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

<meta property="og:site_name" content="IMDb"/>

<meta property="fb:admins" content="USER_ID"/>

<meta property="og:description"

content="A group of U.S Marines, under command of

a renegade general, take over Alcatraz and

threaten San Francisco Bay with biological

Trang 32

Page 32 An Introduction To Facebook Development

Social Plugins

Like Box

Registration Recommend

Comment

Trang 33

Social Plugins

Social plugins let you see what your friends have liked,

commented on or shared on sites across the web.

Social plugins could be embed by using iFrame (<iframe>) or

Trang 34

Page 34 An Introduction To Facebook Development

Trang 35

Facebook Tools – Graph API Explorer

Trang 36

Thank For Your Attention !

Ngày đăng: 27/06/2014, 21:20

TỪ KHÓA LIÊN QUAN