.
*/
if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/facebookaction.php');
class FacebookinviteAction extends FacebookAction
{
function handle($args)
{
parent::handle($args);
$this->error = $error;
if ($this->flink) {
if (!$this->facebook->api_client->users_hasAppPermission('status_update') &&
$this->facebook->api_client->data_getUserPreference(
FACEBOOK_PROMPTED_UPDATE_PREF) == 'true') {
echo '
REDIRECT TO HOME
';
}
} else {
$this->showPage();
}
}
function showContent()
{
// If the user has opted not to initially allow the app to have
// Facebook status update permission, store that preference. Only
// promt the user the first time she uses the app
if ($this->arg('skip')) {
$this->facebook->api_client->data_setUserPreference(
FACEBOOK_PROMPTED_UPDATE_PREF, 'true');
}
if ($this->flink) {
$this->user = $this->flink->getUser();
// If this is the first time the user has started the app
// prompt for Facebook status update permission
if (!$this->facebook->api_client->users_hasAppPermission('status_update')) {
if ($this->facebook->api_client->data_getUserPreference(
FACEBOOK_PROMPTED_UPDATE_PREF) != 'true') {
$this->getUpdatePermission();
return;
}
}
} else {
$this->showLoginForm();
}
}
function showSuccessContent()
{
}
function showFormContent()
{
}
function title()
{
return sprintf(_('Login'));
}
function redirectHome()
{
}
}