Dan Lester, Co-founder & CTOWhat Developers can do with Facebook Fan Pages
Main Integration Points
• Stream on the Wall tab
• FBML boxes
• Page tabs
• Edit page
• App Canvas in ‘Fan Page context’
• API calls for Page/User info
Stream on the Wall tab
FBML boxes
Page tabs
Edit page
Edit page
App Canvas in ‘Fan Page context’
http://apps.facebook.com/hedkandi/
http://apps.facebook.com/hedkandi/edit/?fb_page_id=77387163
http://apps.facebook.com/hedkandi/.../?fb_page_id=77387163
API calls for Page/User info
• pages.getInfo
• pages.isAdmin
• pages.isAppAdded
• pages.isFan
Supporting Fan Pages in an app
• Developer app• Authentication tab• Tick “Facebook Pages”
Page admin installs the app
Which pages have installed the app?
• You do not get an ‘allow’ ping• Can’t query which Pages have the app installed
• Page tab is activated (or canvas in ‘Page context’)
• http://www.facebook.com/add.php? api_key=9914392752d39e99600f2be9d2d740e2&pages
• FQL: select page_id, type from page_admin where uid = 534210316
FQL query on page_admin<page_admin> <page_id> 89883054748 </page_id> <type> LOCAL_TECHNOLOGY_TELECOMMUNICATIONS_SERVICES </type></page_admin>
<page_admin> <page_id> 81932813028 </page_id> <type> LOCAL_BUSINESS </type></page_admin>
<page_admin> <page_id> 22402815405 </page_id> <type> TELEVISION </type></page_admin>
<page_admin> <page_id> 7738716301 </page_id> <type> TECHNOLOGY </type></page_admin>
Can combine with page table to get more info such as Page names, profile picture URL, all data, and fan count
Also has_added_app
Using the Stream
• Stream.publish not for Pages yet
• Use feed.publishTemplatizedAction instead
FBML Boxes
• profile.setFBML with page id
• Parameters markup and profile_main
• Correspond to Boxes and Wall/Info
• <fb:add-section-button section="profile" />
Page Tabs
• Add tab name and sub-URL in developer app
Page Tabs
Page Tabs
Page Tabs
• Tab callback does not receive fb_sig_user
• fb_sig_page_id• fb_sig_is_admin (need to check)• fb_sig_is_fan• fb_sig_page_added (always 1 for tab)• fb_sig_type
Page Tabs
• AJAX call can get user-specific info
• Relative hyperlinks stay within tab• Absolute links back to canvas
• FBJS and Flash do not autoload
Page Tabs
Page Tabs
Page Tabs
Page Tabs
Canvas in Fan Page context
http://apps.facebook.com/hedkandi/
http://apps.facebook.com/hedkandi/edit/?fb_page_id=77387163
http://apps.facebook.com/hedkandi/.../?fb_page_id=77387163
• Might also get user info passed as POST params
• Edit pages can have <fb:page-admin-edit-header />
Dan [email protected]://theiplatform.com