From 78bf36129188604e229014a1d063cd818f263a92 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 23 Jan 2009 07:09:00 +0000 Subject: trac750 fix href for theme stylesheet --- actions/facebooklogin.php | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 actions/facebooklogin.php (limited to 'actions/facebooklogin.php') diff --git a/actions/facebooklogin.php b/actions/facebooklogin.php new file mode 100644 index 000000000..94d494a82 --- /dev/null +++ b/actions/facebooklogin.php @@ -0,0 +1,101 @@ +. + */ + +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() + { + + } + +} -- cgit v1.2.3-54-g00ecf