Class

SAF_Session

Methods

getAppId

getAppId()

getPageData

getPageData()

getPageAccessToken

getPageAccessToken()

getPageId

getPageId()

getPageName

getPageName()

getPageProfileUrl

getPageProfileUrl()

getPageProfilePicture

getPageProfilePicture()

getPageLikes

getPageLikes()

getPageWebsite

getPageWebsite()

getPageTabUrl

getPageTabUrl()

getAddPageTabUrl

getAddPageTabUrl()

getCanvasUrl

getCanvasUrl()

isPageLiked

isPageLiked()

isPagePublished

isPagePublished()

hasPageRestrictions

hasPageRestrictions()

getUserData

getUserData()

getUserId

getUserId()

getUserName

getUserName()

getUserFirstName

getUserFirstName()

getUserLastName

getUserLastName()

getUserGender

getUserGender()

getUserEmail

getUserEmail()

getUserProfileUrl

getUserProfileUrl()

getUserProfilePicture

getUserProfilePicture()

getUserGrantedPerms

getUserGrantedPerms()

getUserRevokedPerms

getUserRevokedPerms()

isPageAdmin

isPageAdmin()

isAppDeveloper

isAppDeveloper()

isAuthenticated

isAuthenticated()

hasPermission

hasPermission()

__construct

__construct()

CONSTRUCTOR

Parameters:string – app id for the SAF session we want to access
Return type:void

setPersistentData

setPersistentData()

Stores the given ($key, $value) pair, so that future calls to getPersistentData($key) return $value. This call may be in another request.

Parameters:
  • string
  • mixed
Return type:

void

getPersistentData

getPersistentData()

Get the data for $key

Parameters:
  • string – The key of the data to retrieve
  • boolean – The default value to return if $key is not found
Return type:

mixed

_getPersistentSignedRequestData

_getPersistentSignedRequestData()

Helper to get to signed request data sub key Actually returns $_SESSION[‘fb_APPID_saf_signed_request’][$key]

Parameters:
  • string – The key of the data to retrieve
  • boolean – The default value to return if $key is not found
Return type:

mixed

_getPersistentPageData

_getPersistentPageData()

Helper to get to page data sub key Actually returns $_SESSION[‘fb_APPID_saf_page][$key]

Parameters:
  • string – The key of the data to retrieve
  • boolean – The default value to return if $key is not found
Return type:

mixed

_getPersistentUserData

_getPersistentUserData()

Helper to get to user data sub key Actually returns $_SESSION[‘fb_APPID_saf_user][$key]

Parameters:
  • string – The key of the data to retrieve
  • boolean – The default value to return if $key is not found
Return type:

mixed

_constructSessionVariableName

_constructSessionVariableName()

Construct variable name just for our SAF persistent data eg - ‘key’ becomes ‘fb_APPID_saf_key’

access private

Return type:void