You are on page 1of 38

What is Facebook

 Social Network
 More than 400M users worldwide
 Gallery, Profile Management, Collaboration, Notes,
Ratings, Discussion boards, Video all in one place.
 You don’t need to pay anything to access it.
Benefits of developing on FB
platform
 User management is done by FB
 Harvest social relationships
 Viral marketing
 Easy to develop, promote and monetize
 Bring an existing app and brand into FB
 Support for different languages
What can I develop?
 Imagination is the Limit
 Games
 Dump Entertaining Apps
 Content Sharing Apps
 Business Apps
 Social Network Aggregator and Mashups
Basic Concepts
 Facebook applications are applications that use
Facebook Platform to access and incorporate Facebook
social data
 All applications (including those developed by
Facebook) can be added or removed by a user, which
will add or remove an application from a user’s
account. Users can add and remove applications at
will.
 Users can also authorize applications (by “logging in”
to an application) to access their user data.
Facebook App Environment
Facebook App Execution
Facebook API Web Service
 A user has to authorize the application to fetch user data.
 Session key is issued that grants application to make calls
to the API Web Service (api.facebook.com/restserver.php)
 All API calls made with the user’s session key would return
user’s specific data.
 Most data returned from Web service is simple XML,
defined by an XML schema document at
http://api.facebook.com/1.0/facebook.xsd.
 You can use this to create bindings, run XSLT on the
results, or simply use as a reference to understand the data
being returned.
Developing Application :Example
 Login here : http://facebook.com/developers
Configuration (Canvas)
Configuration (Authentication)
Post Authorization
 Facebook pings an url whenever a user authorizes an
application. This url must be specified in our
developer application as shown below.
And the output is
http://apps.facebook.com/softexpo/
Important Components
 FBML
 FBJS
 FQL
 XFBML
 REST API
FBML
 Its like any other markup language. Comes with
namespace “fb”.

http://wiki.developers.facebook.com/index.php/FB
ML
Facebook Integration Points
 Facebook platform provides integration points into the
facebook profile.
 Feed: An application can publish content into a user's
Feed, appearing on the user's Wall tab.
 Profile box: The profile box provides a space for the
application to represent itself on a user's profile.
 Feed Forms: Feed forms are special FBML
components that allow applications to publish Feed
stories on the behalf of users.
Feed Form
 A Feed Form is a form which prompts the user to post something to
his/her/friend's/page's/group's/event's wall. Because it is a form, the user must
click the "Publish" button to publish the feed to the wall. A Feed Form is simply
something like this:
Sample FBML
<fb:board xid="titans_board" canpost="true"
candelete="false" canmark="false" cancreatetopic="true"
numtopics="5"
returnurl="http://apps.facebook.com/myapp/titans/">
<fb:title>Discuss the Titans</fb:title>
</fb:board>
Sample FBML – Invite Friends
<fb:request-form
action="index.php"
method="POST"
invite="true"
type="Softexpo 2010"
Content="Checkout Softexpo Application on Facebook">

<fb:multi-friend-selector actiontext="Invite your friends


to use
SoftExpo." />
</fb:request-form>
Demo 1 : Facebook Tools
 Go to http://developers.facebook.com/tools.php
 Demo of API Test Console
 Demo of FBML Test Console
 Demo of FQML Test Console
Demo 2 : Facebook Application
 Go to www.facebook.com/developers
 Go to the Developer application and click “Set Up New
Application”. Give your application a name, check to
accept the Terms of Service, then click Submit.
 Canvas Page URL : The address which is seen by your
application users. Your users go to this address in
facebook to access your application. In the example "
http://apps.facebook.com/myfbapp_pi/ “
 Canvas Callback URL : The location where to host
your application.
FQL
SELECT name, pic
FROM user
WHERE uid IN (SELECT uid2
FROM friend
WHERE uid1 = 1027980517)
AND sex='female'
FQL
 You can get the result of complex “SEARCH” quickly
 You can do things which are resource hungry, quite
easily
 You can join complex queries together and find a
specific item
Authorization
Authorization is an important step and concept about
Facebook applications. According to Facebook's policy, an
application can only perform the followings without a
permission of the user:
 Access the user's name, user's profile picture and the list of
friends of the user, provided that the user does not choose
to hide his/her information for public search
 Publish feeds to the user's wall by prompting the user to do
so
 Send request or invitations to other users by prompting the
user to do so.
Extended Permissions
 SMS, Stream, Email, Events, Notes, status_update and
a lot more.
 http://wiki.developers.facebook.com/index.php/Exten
ded_permissions
 <fb:prompt-permission perms="publish_stream">
Let me update your status
</fb:prompt-permission>
Output
Successful Apps
Successful Apps
Monetization
 Freemium Business Model
 FBFund
 Advertisement
 Virtual Currency
Other Things
 FBConnect based applications
 FB App Dev for iPhone
References
 http://wiki.developers.facebook.com
 http://developers.facebook.com/tools.php
 http://developers.facebook.com/get_started.php?tab=
anatomy
 http://www.facebook.com/developers/
 http://developers.facebook.com/connect.php
Conclusion
 Facebook applications can embed advertising and
sponsorship – no revenue sharing
 Facebook applications run from your servers giving
more accountability and metrics
 Face application platform enables rapid application
development in multiple languages.

You might also like