27
8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010 http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 1/27 Facebook Applications Sriram Kumar Freelance Web Developer

Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

  • Upload
    hmvrulz

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 1/27

Facebook ApplicationsSriram Kumar

Freelance Web Developer

Page 2: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 2/27

History of Facebook

Facebook was founded by four people MarkZuckerberg, Eduardo Saverin, Dustin Moskovitz and

Chris Hughes. Mark Zuckerberg developed Facemash on October

28, 2003.

Facemash is a version of Hot or Not of Harvard.

Facemash generated 450 visitors and 22,000 photoviews in its first four hours online.

Facemash later turned into Facebook with someadded features.

Page 3: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 3/27

Terms Used

If you are planning to develop applications for

Facebook obviously you need to learn Facebook

terminology. Here are some words frequently used in

Facebook:

Wall

Profile

News Feed

Poke

Canvas

Page 4: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 4/27

Advantages of Having a Facebook

Application

Drive Web Traffic

Reputation Management Good Possibility of New Customer Acquisition

The Viral Effect Word of Mouth

Page 5: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 5/27

Drawbacks of Facebook Apps

Less Chances For SEO

Limited API Calls Lots of Depricated Functions

Many Rules.

Page 6: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 6/27

Sample Facebook Apps

There are two types of Facebook Applications.

Product Dependent Applications and

Product Independent Applications

Page 7: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 7/27

Sample Facebook Apps

Product Dependent Apps

These are nothing but a bridge created beetween Facebook

and the users with an already existing product.

This is only done to expand the market of that product.

The best example is Zoho on Facebook.

Zoho is a business solution provider. With zoho we can store

and read office docs online, chat with zoho users, have a

planner and many more. Zoho has developed a Facebook app where zoho users can

login to the app and read their stored word, excel, pdf 

documents etc.

Page 8: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 8/27

Sample Facebook Apps

Product Dependent Apps

Zoho can be accessed at: http://apps.facebook.com/zohoapp

Page 9: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 9/27

Sample Facebook Apps

Product Dependent Apps

Page 10: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 10/27

Sample Facebook Apps

Product Independent Apps

The product independent applications are becoming more

and more popular on Facebook.

These are the applications that are created only for Facebook.They dont have a market outside Facebook.

Examples are Zynga Games, Magic Fortune Cookie, Anita

Predictions, BillMonk, Facebook Quiz etc.

90% of the Facebook applications come under the productindependent category.

Page 11: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 11/27

Sample Facebook Apps

Product Independent Apps

The product independent applications are becoming more

and more popular on Facebook.

These are the applications that are created only for Facebook.They dont have a market outside Facebook.

Examples are Zynga Games, Magic Fortune Cookie, Anita

Predictions, BillMonk, Facebook Quiz etc.

90% of the Facebook applications come under the productindependent category.

Page 12: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 12/27

API

Facebook API is a web services programming interface for

accessing core Facebook services.

It is based on a REST(Representational State Transfer) basedarchitecture.

Facebook officially supports PHP and Java.

Unofficial client libraries available for ASP.NET, C#, C++, Perl,

Python, Ruby on Rails, VB.NET and Windows Mobile.

Page 13: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 13/27

API

Some API Methods:

users.getInfo : Fetch User specific info.

photos.addTag : Adds a tag to a photo.

pages.isFan : Checks whether a specified user is a fan of a

page.

feed.publishStoryToUser : Publishes a News Feed story to

the current user.

data.getCookies

data.setCookies

Page 14: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 14/27

FBML

FBML stands for Facebook Markup Language.

It contains a subset of HTML elements.

FBML also contains several extensions for Facebook UI

elements.

For example, the element fb:name displays the name of the

user based on the UID attribute.

Page 15: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 15/27

FBML

Consider the following FBML syntax:

<p>Hello: <fb:name uid=974127077 useyou=false/></p>

If the name of the user with the user Id 974127077 is Ram Kumar theoutput will be Hello: Ram Kumar.

If we change the attribute useyou =true then the output will be Hello:

you if the script is executed from the login of Ram Kumar; for other users

the output will be Hello: Ram Kumar.

Page 16: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 16/27

FQL

FQL is Faecbook Query Language.

With FQL we can access Facebook database tables such as user, friend,group, phot, album etc.

FQL is similar to standard SQL but with a few restrictions. SELECT statements must be performed on one table at a time.

Join queries are not permitted.

We can perfrom most of the data access in Facebook with API as well asFQL.

If you need to access the list of friends of a particular user, you can useeither an API call or a FQL statement.

API calls are nothing but wrappers for FQL querite.

FQL helps to reduce the bandwidth, parsing overhead and can minimizethe number of data requests in complex situations.

Page 17: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 17/27

Configuration

Pre Requisites:

Domain Name

WebHosting

A Sub domain

Facebook API uploaded in the Server

A Facebook Account.

Facebook Client Library

Page 18: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 18/27

Configuration

Create a Facebook account.

Create a sub domain in your web server for the domain name hosted.

Here, I am giving it as ram.webfolks.in

Login to Facebook and then go to facebook.com/developers

Click on Setup New Application.

Page 19: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 19/27

Configuration

Page 20: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 20/27

Configuration

Page 21: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 21/27

Configuration

Page 22: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 22/27

Configuration

Page 23: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 23/27

Configuration

Page 24: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 24/27

Configuration

Page 25: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 25/27

Configuration

Page 26: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 26/27

References

References:

http://wiki.developers.facebook.com/

Wikipedia.com

Facebook Application Development by Nick Gerakines

Page 27: Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

8/9/2019 Facebook Apps - Sriram Kumar - Bangalore PHP Meet April 2010

http://slidepdf.com/reader/full/facebook-apps-sriram-kumar-bangalore-php-meet-april-2010 27/27

Thank You

Sriram Kumar 

[email protected]