IP.Board  3.3.0
facebook_connect Class Reference

Public Member Functions

 __construct ($registry, $token='', $userId=0, $forceThrowException=false)
 _login ()
 fetchHasAppPermission ($permission)
 fetchUserData ($token='')
 fetchUserTimeline ($userId=0, $minId=0, $stripReplies=true)
 finishConnection ()
 finishLogin ()
 finishNewConnection ($originalId, $newId)
 isConnected ()
 postLinkToWall ($url, $comment='', $shorten=true)
 redirectToConnectPage ()
 resetApi ($token='', $userId='')
 revokeAuthorization ()
 syncMember ($memberData)
 updateStatusWithUrl ($content, $url, $alwaysAdd=false)
 userHasRemovedApp ()

Data Fields

 $extendedPerms = array( 'email', 'read_stream', 'publish_stream' )

Protected Attributes

 $_api
 $_connected = false
 $_login
 $_oauth
 $_userData = array()
 $_userId
 $_userToken
 $cache
 $caches
 $DB
 $lang
 $member
 $memberData
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( registry,
token = '',
userId = 0,
forceThrowException = false 
)

Construct. $this->memberData['twitter_token'] $this->memberData['twitter_secret']

Parameters:
objectRegistry object
stringFacebook user token
intUser ID
booleanForce an exception to be thrown rather than output error (used in IPSMember::buildDisplayPhoto) public
Returns:
void

Member Function Documentation

_login ( )

Accessor for the log in functions

public

Returns:
object
fetchHasAppPermission ( permission)

Fetch user has app permission Wrapper so we can change it later

public

Parameters:
stringPermission mask ('email', etc)
Returns:
boolean
fetchUserData ( token = '')

Return user data

public

Returns:
array
fetchUserTimeline ( userId = 0,
minId = 0,
stripReplies = true 
)

Fetch a user's recent status updates (max 50)

public

Parameters:
intTwitter ID
boolStrip (true default)
intMinimum ID to grab from
Returns:
array

Completes the connection

public

Returns:
redirect

Completes the connection

public

Returns:
redirect
finishNewConnection ( originalId,
newId 
)

Finish a log-in connection WARNING: NO PERMISSION CHECKS ARE PERFORMED IN THIS FUNCTION.

public

Parameters:
intForum ID of original member (member to keep)
intForum ID of linking member (member to remove)
Returns:
boolean

Return whether or not the user is connected to twitter

public

Returns:
boolean
postLinkToWall ( url,
comment = '',
shorten = true 
)

Post a link to the user's FB wall

public

Parameters:
stringURL
stringComment (can be NUFING)

Redirects a user to the oauth connect page.

public

Returns:
redirect
resetApi ( token = '',
userId = '' 
)

Resets API

public

Parameters:
stringOAUTH user token

Revoke app authorization

public

Returns:
boolean
syncMember ( memberData)

Function to resync a member's Facebook data

public

Parameters:
mixedMember Data in an array form (result of IPSMember::load( $id, 'all' ) ) or a member ID
Returns:
array Updated member data

EXCEPTION CODES: NO_MEMBER Member ID does not exist NOT_LINKED Member ID or data specified is not linked to a FB profile

updateStatusWithUrl ( content,
url,
alwaysAdd = false 
)

Post a status update to Facebook based on native content Which may be longer and such and so on and so forth, etc

public

Parameters:
stringContent
stringURL to add
boolAlways add the URL regardless of content length

User has removed app from Facebook

See Also:
http://wiki.developers.facebook.com/index.php/Post-Remove_Callback_URL

public


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables