Facebook Application Development - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Facebook Application Development

Description:

The first step in creating a Facebook application is to Add the 'Developer' ... echo ' div style='margin:20px;' '.$logo.' /div '; ANATOMY OF A FACEBOOK APPLICATION ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 9
Provided by: rustywil
Category:

less

Transcript and Presenter's Notes

Title: Facebook Application Development


1
  • Facebook Application Development

2
Creating A Facebook Application
The first step in creating a Facebook application
is to Add the Developer application and apply
for an API key.
3
applications Edit Settings
  • Application Name
  • Callback Url (http//fb.terralever.com/default.as
    px)
  • After the user installs your application, they
    will be redirected to this URL with an
    authentication token.
  • Canvas Page URL (http//apps.facebook.com/appname
    /)
  • Use FBML or iframe
  • Developers (Developers Mode)
  • Default FBML
  • Side Nav URL

4
Anatomy of a Facebook application
lt?php include_once 'facebook.php' api_key
'394759e4eed094bd5ecff8a30fb9d276' secret
'415a8724657f40a47ab96b2babe07e7a' facebook
new Facebook(api_key, secret) user
facebook-gtrequire_login() //require that the
app be installed prior to displaying canvas
page if (!facebook-gtapi_client-gtusers_isAppAdded(
)) facebook-gtredirect(facebook-gtget_add_ur
l()) //set the fbml logo_sm 'ltimg
srchttp//www.safeandsustainable.com/logo_sm.jpg
gt' name 'ltfbname uid"'.user.'"
firstnameonly"true" useyou "false"/gt' fbml
'ltfbnarrowgt' . name . ' this is narrowltbr/gt'.
logo_sm . 'lt/fbnarrowgt' fbml . 'ltfbwidegt' .
name . ' this is wideltbr/gt'. logo_sm .
'lt/fbwidegt' facebook-gtapi_client-gtprofile_setFB
ML(fbml, user) //return the canvas view logo
'ltimg src"http//www.safeandsustainable.com/log
o.jpg"gt' echo 'ltdiv style"margin20px"gt'.logo.
'lt/divgt' ?gt
5
Application Installation
lt?php include_once 'facebook.php' api_key
'394759e4eed094bd5ecff8a30fb9d276' secret
'415a8724657f40a47ab96b2babe07e7a' facebook
new Facebook(api_key, secret) user
facebook-gtrequire_login() //require that the
app be installed prior to //displaying canvas
page if (!facebook-gtapi_client-gtusers_isAppAdded(
)) facebook-gtredirect(facebook-gtget_add_ur
l())
6
Facebook Profile View
7
Facebook Profile View - Code
lt?php . //set the fbml logo_sm 'ltimg
src"http//www.safeandsustainable.com/logo_sm.jpg
"gt' name 'ltfbname uid"'.user.'"
firstnameonly"true" useyou "false"/gt' fbml
'ltfbnarrowgt' . name . ' this is narrowltbr/gt'.
logo_sm . 'lt/fbnarrowgt' fbml . 'ltfbwidegt' .
name . ' this is wideltbr/gt'. logo_sm .
'lt/fbwidegt' facebook-gtapi_client-gtprofile_setFB
ML(fbml, user) . ?gt
8
Facebook Canvas View
lt?php . //return the canvas view logo 'ltimg
src"http//www.safeandsustainable.com/logo.jpg"gt'
echo 'ltdiv style"margin20px"gt'.logo.'lt/divgt'
. ?gt
Write a Comment
User Comments (0)
About PowerShow.com