Services_Facebook
[ class tree: Services_Facebook ] [ index: Services_Facebook ] [ all elements ]

Class: Services_Facebook_Auth

Source Location: /Services_Facebook-0.2.14/Services/Facebook/Auth.php

Class Overview

Services_Facebook_Common
   |
   --Services_Facebook_Auth

Facebook Authentication Interface


Author(s):

Version:

  • Release: 0.2.14

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
Facebook Authentication Interface

  1.  <?php
  2.  require_once 'Services/Facebook.php';
  3.  $api Services_Facebook();
  4.  // An instance of SimpleXmlElement with the response loaded into it
  5.  // is returned.
  6.  $session $api->auth->getSession($_GET['auth_token']);
  7.  echo 'uid: ' . (string)$session->uid . '<br />';
  8.  echo 'session_key: ' . (string)$session->session_key . '<br />';
  9.  ?>



[ Top ]


Method Detail

createToken   [line 55]

string createToken( )

Create a token for login
  • Access: public

[ Top ]

expireSession   [line 104]

void expireSession( )

Expire session

Invalidates the current session being used, regardless of whether it is temporary or infinite. After successfully calling this function, no further API calls requiring a session will succeed using this session. If the invalidation is successful, this will return true.

  • Access: public

[ Top ]

getSession   [line 68]

object SimpleXmlElement getSession( string $authToken)

Convert auth_token into a session_key
  • Return: of response
  • Access: public

Parameters:

string   $authToken   —  auth_token from callback

[ Top ]

promoteSession   [line 87]

void promoteSession( )

Promote session

Creates a temporary session secret for the current (non-infinite) session of a Web application. This session secret will not be used in the signature for the server-side component of an application, it is only meant for use by the application which additionally want to use a client side component. (e.g. Javascript Client Library)

  • Access: public

[ Top ]

revokeAuthorization   [line 122]

void revokeAuthorization( [string $uid = null])

Revoke authorization

If this method is called for the logged in user, then no further API calls can be made on that user's behalf until the user decides to authorize the application again.

  • Access: public

Parameters:

string   $uid   —  User's id

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:36:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.