I need to let a user log into twitter and post a status, then after that log them out automatically.
I’ve looked through the Twitter API and could not find anything.
Current code:
twttr.ready(function (twttr) {
twttr.events.bind('tweet', function(event) {
if(!code){
jQuery('#voucher-container').show();
var data = {sessionId: sessionId, type: 'twitter'};
jQuery.post('checkTweet.php', data, function(response){
response = jQuery.parseJSON(response);
if(response.error){
alert(response.error);
}
else{
window.location.href = 'stage3.php';
}
});
code = true;
}
});
});
Any help is much appreciated. Thanks.
You cannot log the user out from twitter through their API.
Twitter API – Logout