Get login state of twitter in Javascript
===

**GOAL:** 
I am making a HTML textarea that will be able to share to different social networks on submit. The user can toggle options of service to share to and on each toggle, authenticates to that service. The sharing is only done once the user clicks submit.

**CONSTRAINTS:** 
I don't want to use any built-in HTML elements like buttons or widgets of Twitter's @Anywhere platform, because they load in iframes and I can't customize them, etc. I am however using the @Anywhere platform for things like:

    T.signIn()
    T.Status.update()
    etc

**PROBLEM:**
Basically I want the UI to be my own. But the @Anywhere function T.isConnected() is worthless, it always returns false. This seems to be a known yet ignored bug:
[http://code.google.com/p/twitter-api/issues/detail?id=1932][1], and 
[https://groups.google.com/forum/?fromgroups#!topic/twitter-dev-anywhere/_wwDJqv2Y58][2]

I have two cookies in my browser after authenticating with T.signIn()

    twitter_anywhere_identity
    _twitter_sess 

but I don't know what service I could make a call to in order to verify that these tokens are valid. 

the twitter_anywhere_identity cookie can be used to verify that:
sha1(`user_id` + `consumer_secret`) = value in cookie right of ':' 

as seen here:
[https://dev.twitter.com/docs/anywhere/welcome#current-user][3]

but that is a non-dynamic identity that doesn't change (i.e., after a user logs out this doesn't change or go invalid). so just checking that with javascript doesn't help. 

how can I check the state of my being logged into Twitter from JavaScript?


  [1]: http://code.google.com/p/twitter-api/issues/detail?id=1932
  [2]: https://groups.google.com/forum/?fromgroups#!topic/twitter-dev-anywhere/_wwDJqv2Y58
  [3]: https://dev.twitter.com/docs/anywhere/welcome#current-user