The document provides an introduction to developing Facebook applications, explaining what Facebook is, why developers might create Facebook apps, how the Facebook platform and APIs work, and some of the tools and technologies involved like FBML, FQL, and FBJS. It also gives examples of top Facebook apps and describes common Facebook app functions and components.
2. Who we are
Abhishek Deshpande Chetan Gole
MBA Student MCA Student
Follow @Fitehal Follow @_techie
Abhishek@whoisabhi.com me@thechetan.com
3. What is Facebook
More than 400 million active users on Facebook
People spend over 500 billion minutes per month on Facebook
over 160 million objects(pages, groups and events) that people interact
More than 70 translations
30% of Facebook users are from United States
Ref : http://www.facebook.com/press/info.php?statistics
4. Why Facebook App.
Bring Existing App to FB World
Campaigning on FB
Building a Brand
5. Top Facebook Apps
Name Developer
1. FarmVille Zynga
2. Static FBML Facebook
3. Facebook for iPhone Facebook
4. Birthday Cards RockYou!
5. Texas HoldEm Poker Zynga
6. Caf辿 World Zynga
7. Causes Causes
8. Mafia Wars Zynga
9. PetVille Zynga
10. Mobile Facebook
7. What happens when
you access Facebook
App
Image Credit : http://www.zilby.com/images/arch.png
8. Facebook Platform
FBML / XFBML -Tag based markup language derived from
HTML / XML, with some extra Power to play with FB
FQL - Facebook query language - Ideal for querying extra
data from Facebook Internal data tables.
FBJS - Facebook version of Javascript minimizing threats of
Cross scripting attacks. Supports Most of DOM - Based
manipulation Methods
9. Facebook API
Facebook API calls are grouped into various action
categories, each focuses on different aspect of platform.
Let us look at some basic ones :
facebook.auth - basic authentication checks for facebook users
facebook.feed - Post to facebook news feed
facebook.friends - query fb for various checks on a user's friends
facebook.notification - send messages to users
facebook.profile - set FBML in user's profile
facebook.events - way to access FB events
facebook.groups - access information for facebook groups
facebook.photos - interact with facebook photos
10. Client Libraries
PHP
- Easy to use
- Officially Supported
- Wide options for Hosting
Also Libraries are Available for Python, Ruby, .NET, Java & C++
11. FBML
Facebook markup language derived from HTML /
XML.
To distinguish between HTML and FBML in app code,
you need to prefix fb: to FBML tags
More than 100 tags to play with.
17. $fql = "Select name, pic FROM user where
uid='100000860190302'";
$fql_result=$facebook->api_client->fql_query($fql);
print_r($fql_result);
Array (
[name] => Pranay Patil
[pic] =>
http://profile.ak.fbcdn.net/hprofile-ak-
sf2p/hs624.snc3/27399_100000860190302_8058_s.jpg
)
18. Functions (FQL)
now() Returns the current time.
rand() Generates a random number.
strlen(string) Returns the length of the string.
concat(string, ...) Concatenates the given strings (can take any
number of strings).
19. More Functions (FQL)
substr(string, start, length) Gets a substring of the string.
strpos(haystack, needle) Returns the position of needle in
haystack, or -1 if it is not found.
lower(string) Converts the string to lower case.
upper(string) Converts the string to upper case.
strip_tags(field) Strips HTML markup and encoding from a
specified FQL field.
20. FBJS
<script> Tag is allowed
Javascript/DOM "id" values are rewritten on-the-fly
<a href="#" onclick="new Dialog().showMessage('Dialog', 'Hello
World.'); return false;"> Display Dialog.</a>
21. Developer resources
Test Console http://developers.facebook.com/tools.php
Developer Application http://www.facebook.com/developers/
Developer Wiki http://wiki.developers.facebook.com
22. if (questions)
{
for Q in questions:
answer(Q)
} else
{
print "Thank you!"
}