Overview

Packages

  • None
  • Service
    • Facebook

Classes

  • Horde_Service_Facebook_Auth
  • Horde_Service_Facebook_Base
  • Horde_Service_Facebook_BatchRequest
  • Horde_Service_Facebook_ErrorCodes
  • Horde_Service_Facebook_Events
  • Horde_Service_Facebook_Exception
  • Horde_Service_Facebook_Fql
  • Horde_Service_Facebook_Friends
  • Horde_Service_Facebook_Groups
  • Horde_Service_Facebook_Links
  • Horde_Service_Facebook_Notes
  • Horde_Service_Facebook_Notifications
  • Horde_Service_Facebook_Photos
  • Horde_Service_Facebook_Request
  • Horde_Service_Facebook_Streams
  • Horde_Service_Facebook_Translation
  • Horde_Service_Facebook_UploadRequest
  • Horde_Service_Facebook_Users
  • Horde_Service_Facebook_Videos
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Service_Facebook_Auth

Horde_Service_Facebook_Auth:: wrap functionality associated with authenticating to Facebook.

For now, only provide methods for authenticating that make sense from within a Horde context.

Copyright 2009-2012 Horde LLC (http://www.horde.org/)

Horde_Service_Facebook_Base
Extended by Horde_Service_Facebook_Auth
Package: Service\Facebook
Category: Horde
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Horde/Service/Facebook/Auth.php
Methods summary
public string
# getOAuthUrl( string $callback, array $perms = array() )

Get the URL for the user to authenticate the application and authorize various extender permissions/

Get the URL for the user to authenticate the application and authorize various extender permissions/

Parameters

$callback
The callback url. FB will redirect back to here.
$perms
An array of FB permissions to request.

Returns

string
The URL.
public string
# getAuthTokenUrl( string $code, string $callback )

Returns the URL to obtain the auth_token from FB after getOAuthUrl redirects back to your callback URL.

Returns the URL to obtain the auth_token from FB after getOAuthUrl redirects back to your callback URL.

Parameters

$code
The code returned by FB after the OAuth2 dialog
$callback
<p>The callback url. Required in order to authenticate via OAuth2.</p>

Returns

string
The URL.
public string
# getSessionKey( string $code = null, string $callback = '' )

Obtain the current access_token. Either returns the currently set token or, if a OAuth2 code is provided, sends a GET request to FB requesting the access_token.

Obtain the current access_token. Either returns the currently set token or, if a OAuth2 code is provided, sends a GET request to FB requesting the access_token.

Parameters

$code
The code returned from FB's OAuth dialog.
$callback
<p>If provided, used as the callback URL required during the final steps in the OAuth2 process.</p>

Returns

string
The access_token

Throws

Horde_Service_Facebook_Exception
public
# setSession( string $sessionKey )

Sets an existing access_token for this session.

Sets an existing access_token for this session.

Parameters

$sessionKey
The FB OAuth2 access_token
public unknown_type
# revokeExtendedPermission( string $perm )

Revoke a previously authorizied extended permission

Revoke a previously authorizied extended permission

Parameters

$perm
The extended permission to remove.

Returns

unknown_type
public string &
# getLoggedInUser( )

Returns the user corresponding to the current session object.

Returns the user corresponding to the current session object.

Returns

string
User id

Throws

Horde_Service_Facebook_Exception
Methods inherited from Horde_Service_Facebook_Base
__construct()
Constants summary
string EXTEND_PERMS_USER_ABOUT

User Data Perms *

User Data Perms *

# 'user_about_me'
string EXTEND_PERMS_USER_BIRTHDAY
# 'user_birthday'
string EXTEND_PERMS_USER_EVENTS
# 'user_events'
string EXTEND_PERMS_USER_HOMETOWN
# 'user_hometown'
string EXTEND_PERMS_USER_LOCATION
# 'user_location'
string EXTEND_PERMS_USER_PHOTOS
# 'user_photos'
string EXTEND_PERMS_FRIENDS_ABOUT

Friends Data *

Friends Data *

# 'friends_about_me'
string EXTEND_PERMS_FRIENDS_BIRTHDAY
# 'friends_birthday'
string EXTEND_PERMS_FRIENDS_HOMETOWN
# 'friends_hometown'
string EXTEND_PERMS_FRIENDS_LOCATION
# 'friends_location'
string EXTEND_PERMS_FRIENDS_PHOTOS
# 'friends_photos'
string EXTEND_PERMS_OFFLINE

Misc *

Misc *

# 'offline_access'
string EXTEND_PERMS_PUBLISHSTREAM
# 'publish_stream'
string EXTEND_PERMS_READSTREAM
# 'read_stream'
API documentation generated by ApiGen