Class FacebookHelper

Description

Facebook.Facebook helper generates fbxml and loads javascripts

Located in /views/helpers/facebook.php (line 11)

AppHelper
   |
   --FacebookHelper
Variable Summary
mixed $helpers
Method Summary
string activity ([array $options = array()])
string comments ([array $options = array()])
string disconnect ([array $options = array()])
string fanbox ([array $options = array()])
string friendpile ([array $options = array()])
string html ()
string info ([string $name = 'version'])
string init ([array $options = array()])
string like ([array $options = array()])
void likebox ([array $url = null], [ $options = array()])
string livestream ([array $options = array()])
null loader ()
string login ([array $options = array()])
string logout ([array $options = array()])
string picture ([int $uid = null], [array $options = array()])
string recommendations ([array $options = array()])
string share ([string $url = null], [array $options = array()])
Variables
mixed $helpers = array('Html', 'Session') (line 15)

Helpers to load with this helper.

Methods
activity (line 343)

Build a facebook activity feed area.

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string activity ([array $options = array()])
  • array $options: of options for recommendations
    • width : int width of object (default 300)
    • height : int height of object (default 300)
    • header : boolean (default true)
    • colorscheme : light, dark (default light)
    • font : default arial
    • bordercolor : color of border (black, white, grey)
    • recommendations : show recommendations default "false"
comments (line 295)

Build a facebook comments area.

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string comments ([array $options = array()])
  • array $options: of options for comments
    • numposts : number of posts to show (default 10)
    • width : int width of comments blog (default 550)
disconnect (line 123)

Unsubscribe Button - Function which creates link for disconnecting user from the specific application

$this->Facebook->init() is required for this

  • return: Link for disconnect button
  • access: public
string disconnect ([array $options = array()])
  • array $options: of options
    • redirect string to your app's logout url (default null)
    • label string of text to use in link (default logout)
    • confirm string Alert dialog which will be visible if user clicks on the button/link
fanbox (line 249)

Build a become a fan, fanbox

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string fanbox ([array $options = array()])
  • array $options: options to pass into fanbox
    • stream : 1 turns stream on, 0 turns stream off (default 0)
    • connections : 1 turns connections on, 0 turns connections off (default 0)
    • logobar : 1 turns logobar on, 0 turns logobar off (default 0)
    • profile_id : Your Application Id (default Configure::read('Facebook.app_id')
friendpile (line 325)

Build a facebook friendpile area.

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string friendpile ([array $options = array()])
  • array $options: of options for recommendations
    • numrows : int of rows object (default 1)
    • width : int width of object (default 300)
html (line 55)

HTML XMLNS tag (required)

  • return: of html header
  • access: public
string html ()
info (line 33)

Get the info on this plugin

  • return: plugin version
string info ([string $name = 'version'])
  • string $name: name to retrieve (default 'version')
    • 'name' => Plugin Name
    • 'author' => Author Name
    • 'email' => Support Email
    • 'link' => Support Link
    • 'license' => License Info
init (line 371)

HTML XMLNS tag (required)

  • return: of scriptBlock for FB.init() or error
  • access: public
  • example: example not found
string init ([array $options = array()])
  • array $options: of options
like (line 360)

Build a facebook like box

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string like ([array $options = array()])
  • array $options: of options for like box
    • href : URL to like (default same page)
    • show_faces : boolean (default true)
    • font : font type (arial, lucida grande, segoe ui, tahoma, trebuchet ms, verdana)
    • layout : the layout type if the button (button_count, standard, default: standard)
    • action : the title of the action (like or recommend, default: like)
    • colorscheme : the look of the button (dark or light, default: light)
likebox (line 224)

Build a like box

$facebook->init() is required for this

void likebox ([array $url = null], [ $options = array()])
  • array $url: of options to pass into likebox
    • stream : 1 turns stream on, 0 turns stream off (default false)
    • header : 1 turns header on, 0 turns logobar off (default false)
    • width : width of the box (default 300)
    • connections : number of connections to show (default 10)
    • colorscheme : dark | light (default light)
  • $options
livestream (line 273)

Build a livestream window to your live stream app on facebook

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string livestream ([array $options = array()])
  • array $options: options to pass into livestream
    • event_app_id : Your Application Id (default Configure::read('Facebook.appId')
    • xid : Your event XID
    • width : width of window in pixels
    • height: height of window in pixels
loader (line 46)

Loaoder is no longer needed and is now deprecated

null loader ()
login (line 70)

Login Button

$this->Facebook->init() is required for this

  • return: XFBML tag
  • access: public
string login ([array $options = array()])
  • array $options: of options
    • show-faces bool Show pictures of the user's friends who have joined your application
    • width int The width of the plugin in pixels
    • max-rows int The maximum number of rows of profile pictures to show
    • perms list of permissions to ask for when logging in separated by commas (eg: 'email,read_stream,publish_stream'). (http://developers.facebook.com/docs/authentication/permissions)
logout (line 86)

Logout Button

$this->Facebook->init() is required for this

  • return: XFBML tag for logout button
  • access: public
string logout ([array $options = array()])
  • array $options: of options
    • redirect string to your app's logout url (default null)
    • label string of text to use in link (default logout)
    • confirm string Alert dialog which will be visible if user clicks on the button/link
    • custom used to create custom link instead of standart fbml. if redirect option is set this one is not required.
picture (line 197)

Profile Picture of Facebook User

$facebook->init() is required for this

  • return: fb tag for profile picture or empty string if uid is not present
  • access: public
string picture ([int $uid = null], [array $options = array()])
  • int $uid: facebook user id.
  • array $options: options to pass into pic
    • uid : user_id to view profile picture
    • size : size of the picture represented as a string. 'thumb','small','normal','square' (default thumb)
    • facebook-logo: (default true)
    • width: width of the picture in pixels
    • height: height of the picture in pixels
recommendations (line 312)

Build a facebook recommendations area.

$facebook->init() is required for this

  • return: xfbhtml tag
  • access: public
string recommendations ([array $options = array()])
  • array $options: of options for recommendations
    • width : int width of object (default 300)
    • height : int height of object (default 300)
    • header : boolean (default true)
    • colorscheme : light, dark (default light)
    • font : default arial
    • bordercolor : color of border (black, white, grey)
share (line 154)

Share this page

  • return: XFBML tag along with shareJs script
  • access: public
string share ([string $url = null], [array $options = array()])
  • string $url: url: url to share with facebook (default current page)
  • array $options: options to pass into share
    • style: 'button' or 'link' (default'button')
    • label: title of text to link(default 'share')
    • anchor: a href anchor name (default 'fb_share')
    • fbxml: true or false. If true, use fb:share-button xml style instead of javascript share (default false)

Documentation generated on Mon, 29 Nov 2010 23:20:59 -0500 by phpDocumentor 1.4.3