From 3f09cd271ea5e73aad97e567d26667fecf458caf Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 28 Feb 2009 11:27:35 -0500 Subject: [PATCH] Some more documentation on the test/example page --- framework/Service_Facebook/doc/facebook_example.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/Service_Facebook/doc/facebook_example.php b/framework/Service_Facebook/doc/facebook_example.php index e714d3915..c13e73574 100644 --- a/framework/Service_Facebook/doc/facebook_example.php +++ b/framework/Service_Facebook/doc/facebook_example.php @@ -20,7 +20,6 @@ $context = array('http_client' => new Horde_Http_Client(), /** Create the facebook object **/ $facebook = new Horde_Service_Facebook($apikey, $secret, $context); - /** * Authenticating and logging into a Facebook app from an external site is * a complicated and multi-stage process. For these examples, we are assuming @@ -32,7 +31,8 @@ $facebook = new Horde_Service_Facebook($apikey, $secret, $context); * If we have a valid cookie, this will know about it. This method should also * be called both after the user has authorized the application and again after * the user has (optionally) authorized infinite sessions (offline_access). Then - * you would obtain the infinite session_key by calling auth->getSessionKey(). + * you would obtain the infinite session_key by calling auth->getSessionKey() and + * storing the results as you will not be able to retrieve it from FB again. * This is the *only* way to obtain the session key. */ //$facebook->auth->validateSession(); @@ -80,6 +80,10 @@ var_dump($result); // // then redirect if needed... // if ($e->getCode() == Horde_Service_Facebook_ErrorCodes::API_EC_PERMISSION_STATUS_UPDATE) { // // Don't have status_update...tell user/provide link to authorize page etc... + // You can get the link to the authorize page like this: +// $facebook->auth->getExtendedPermUrl( +// Horde_Service_Facebook_Auth::EXTEND_PERMS_STATUSUPDATE, +// 'http://yourcallbackurl.com'); // } else { // // Something else // echo $e->getMessage(); -- 2.11.0