Class

SAF_Facebook

Methods

__construct

__construct()

Constructor

Return type:void

_init

_init()

Init

Return type:void

getAppAccessToken

getAppAccessToken()

Returns the app’s access token

Return type:string|int

getLoginUrl

getLoginUrl()

Returns the login URL

Override’s the Facebook SDK’s native method

Parameters:array – parameters to pass
Return type:string

getLogoutUrl

getLogoutUrl()

Returns the logout URL

Override’s the Facebook SDK’s native method

Parameters:array – parameters to pass
Return type:string

getExtendedPerms

getExtendedPerms()

Returns the permissions the app requested

Return type:string comma delimited string of perms

setExtendedPerms

setExtendedPerms()

Sets the extended perms to be used with getLoginURL();

Parameters:string – delimited perms
Return type:void

getRedirectUrl

getRedirectUrl()

Returns the redirect URL to be used with getLoginUrl()

Return type:string

setRedirectUrl

setRedirectUrl()

Sets the redirect URL to be used with getLoginUrl()

Parameters:string
Return type:void

setExtendedAccessToken

setExtendedAccessToken()

Overrides the Facebook SDK’s setExtendedAccessToken() method. The Facebook SDK (3.2.2) doesn’t set the access token property to the long-lived token for some strange reason so getAccessToken() will still return the short-lived token. So we have to get it from the app session where the Facebook SDK stores it and manually set the access token to the long-lived one.

Return type:void

_determineRedirectUrl

_determineRedirectUrl()

Returns the proper redirect URL for use with getLoginUrl()

Return type:string

debug

debug()

Wrapper around an external class so we can do a simple check if the class (XS_Debug) is avaliable before we attempt to use its method.

Parameters:
  • string – name, label, message
  • var – a variable
  • int – (1)log, (2)info, (3)warn, (4)error
  • bool – log to text file
Return type:

void

Constants

SAF_VERSION

Project Versions

Table Of Contents

Previous topic

Class

Next topic

Class

This Page