Twitter login status check

187 Views Asked by At

Is there anyway to check twitter login status like FB.getLoginStatus(response)? I want to hide the pop-up window if the user already logged. Right now the user has to click the button and every time the window will pop up whether the user logged or not:

$('#twitter').change(function() {
       if($(this).prop('checked')){
           hello('twitter').login(function(e){
               if(e.error){
                   $('#twitter').prop('checked',false);
               }else{
                   var twitter_oauth_token = hello('twitter').getAuthResponse().oauth_token;
                   var twitter_secret = hello('twitter').getAuthResponse().oauth_token_secret;
               }

           });
       }else {

       }
});
1

There are 1 best solutions below

2
John Pelsang On

Looking for the same. I remember doing it years ago with testing image cache, but I am pretty sure that hack is long gone by now. I will have to check some old code. If only I could think of the project I used it on.