}
/**
- * Initialize the object - check to see if we have a valid FB
- * session, verify the signature etc...
- */
- public function validateSession()
- {
- return $this->auth->validateSession(empty($this->_context['no_resolve']));
- }
-
- /**
* Lazy load the facebook classes.
*
* @param string $value The lowercase representation of the subclass.
public function getLoginUrl($next)
{
return Horde_Service_Facebook::getFacebookUrl() . '/login.php?v=1.0&api_key='
- . $this->_apiKey . ($next ? '&next=' . urlencode($next) : '');
+ . $this->_facebook->apiKey . ($next ? '&next=' . urlencode($next) : '');
}
/**
'user' => $uid));
}
+
+ /**
+ * Revoke all application permissions for the current session user.
+ *
+ */
+ function revokeAuthorization()
+ {
+ // Session key is *required*
+ if (!$skey = $this->getSessionKey()) {
+ throw new Horde_Service_Facebook_Exception('session_key is required',
+ Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
+ }
+
+ $this->_facebook->callMethod('Auth.revokeAuthorization',
+ array('session_key' => $skey));
+ $this->expireSession();
+
+ }
}
\ No newline at end of file
return $this->_facebook->callMethod('facebook.users.setStatus', $params);
}
+ public function &getStatus($uid = null, $limit = 1)
+ {
+ if (empty($uid) && !$skey = $this->_facebook->auth->getSessionKey()) {
+ throw new Horde_Service_Facebook_Exception('users.setStatus requires a uid or a session_key',
+ Horde_Service_Facebook_ErrorCodes::API_EC_PARAM_SESSION_KEY);
+ }
+
+ $params = array('session_key' => $skey, 'limit' => $limit);
+ if (!empty($user)) {
+ $params['uid'] = $user;
+ }
+
+ return $this->_facebook->callMethod('Status.get', $params);
+ }
+
}
\ No newline at end of file