case 'associate': // openid associate user break; default: } } else { if (isset($_SESSION['yahoo_oauth_access_token'])) { // restore access token from session $oauthapp->token = YahooOAuthAccessToken::from_string($_SESSION['yahoo_oauth_access_token']); // do something with user data if (isset($_POST['action'])) { switch ($_POST['action']) { case 'updateStatus': if (isset($_POST['status']) && !empty($_POST['status'])) { $status = strip_tags($_POST['status']); $oauthapp->setStatus(null, $status); } header('Location: ' . $oauthapp->callback_url); exit; break; case 'postUpdate': if (isset($_POST['update']) && !empty($_POST['update'])) { $update = strip_tags($_POST['update']); $oauthapp->insertUpdate(null, $update, $update, $oauthapp->callback_url); } header('Location: ' . $oauthapp->callback_url); exit; break; } } }