示例#1
0
} else {
    $lioauth2ChannelHelper = new LiOAuth2ChannelHelper($this->item);
    $isAuth = $lioauth2ChannelHelper->isAuth();
    // New channel, but saved
    if ($isAuth && is_array($isAuth) && array_key_exists('user', $isAuth)) {
        // We have an access Token!
        $user = $isAuth['user'];
        $userId = $user->id;
        $this->item->xtform->set('social_url', $lioauth2ChannelHelper->getSocialUrl($user));
        $validationGroupStyle = null;
        $accessToken = $this->item->xtform->get('access_token');
        $accessTokenSecret = $this->item->xtform->get('access_secret');
        include_once 'validation_button.php';
    } else {
        $message = JText::_('COM_AUTOTWEET_CHANNEL_LIOAUTH2_NEWCHANNEL_AUTHORIZATION');
        $authUrl = $lioauth2ChannelHelper->getAuthorizationUrl();
        if (!empty($authUrl)) {
            $authUrlButtonStyle = null;
            include_once 'auth_button.php';
            include_once 'validation_button.php';
        } else {
            $authUrl = '#';
            $message = JText::_('COM_AUTOTWEET_CHANNEL_LIOAUTH2_NEWCHANNEL_NOAUTHORIZATION');
            include_once 'auth_button.php';
        }
    }
}
?>

<!-- com_autotweet_OUTPUT_START -->