Facebook Platform: 101 - PowerPoint PPT Presentation

About This Presentation
Title:

Facebook Platform: 101

Description:

define Facebook Class. given after you create a new App ... A lot of handy functions provided with a Facebook Object. For example: Users.getInfo ... – PowerPoint PPT presentation

Number of Views:143
Avg rating:3.0/5.0
Slides: 14
Provided by: Shao4
Category:
Tags: book | face | facebook | platform

less

Transcript and Presenter's Notes

Title: Facebook Platform: 101


1
Facebook Platform 101
  • Network Journal Club Meeting
  • Shaomei Wu
  • shaomei_at_gmail.com
  • May 7, 2008

2
You might want to know
  • How to create a Facebook App?
  • How to get data using Facebook Platform?

3
Guide to Create a Facebook Apphttp//developers.f
acebook.com/step_by_step.php
  • Add the Developer Application
  • Get a web server and/with a database service (if
    you will use database) Thanks Chris!
  • Create a new App in Developer
  • Configure your App
  • The form is explained very clearly at
    http//developers.facebook.com/step_by_step.php

4
A very quick start
? define Facebook Class
? given after you create a new App
5
Step-by-step Guide to Creating Facebook
Apphttp//developers.facebook.com/step_by_step.ph
p
6
Extract data with your Apphttp//developers.faceb
ook.com/documentation.php
7
Facebook APIshttp//wiki.developers.facebook.com/
index.php/APIAPI_Methods
  • A lot of handy functions provided with a Facebook
    Object.
  • For example Users.getInfo
  • Returns a wide array of user-specific information
    for each user identifier passed, limited by the
    view of the current user.

8
Examples of using APIs
  • Get current users first name and last name
  • user_detailsthis-facebook-api_client-use
    rs_getInfo(uid, array('last_name','first_name'))
    data'first_name'user_details0'first_name'
    data'last_name'user_details0'last_name'

9
Facebook Queryhttp//wiki.developers.facebook.com
/index.php/FQL
  • Facebook Query Language, or FQL
  • 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
    (assuming your application has access!).
  • It can be very concise and powerful!

10
Examples of using FQLhttp//wiki.developers.faceb
ook.com/index.php/Sample_FQL_Queries
  • Get the names of the groups of which u1 is a
    member
  • SELECT name FROM group WHERE gid IN (SELECT gid
    FROM group_member WHERE uid ''u1'')
  • In PHP, you write
  • query "YOUR QUERY HERE" //(see above
    examples)
  • array facebook-api_client-fql_query(query)
  • The returned array is multidimensional, so
  • attribute array0'attribute'
  • If there are no rows returned, check to see if
    there are any results like this
  • if (result ! NULL)

11
FBMLhttp//wiki.developers.facebook.com/index.php
/FQBML
  • Facebook Markup Language (FBML)
  • To me it looks like facebook CCS a lot of
    predefined dynamics elements. You can hook into
    several Facebook integration points, including
    the profile, profile actions, Facebook canvas,
    News Feed and Mini-Feed.
  • Especially handy when you implement some Facebook
    styled things wall posts, manipulate profile,
    invite friends, send out notifications

12
Examples of using FBML(from the App I wrote)
  • invfbml
  • You've been invited to take a Friendship Quiz.
  • shownetwork"false"/ wants you to take the quiz
    test_name.
  • dshiptest/sNextUrl" label"Take a Friendship
    Quiz!" /
  • FBML
  • ?
  • action"post_invitation.php5" content"ties(invfbml)?" method"POST" invite"true"
  • actiontext"Invite your friends to take a quiz!"
    showborder"true" rows"5" exclude_ids"nds?"
  • echo tid?

13
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com