Check backend OAuth session with @anywhere

18 views
Skip to first unread message

Vasken

unread,
May 10, 2011, 12:56:35 AM5/10/11
to Twitter Anywhere Development
Hi,

I have a situation similar to the one described in this posting from
last June:

http://groups.google.com/group/twitter-dev-anywhere/browse_thread/thread/f20b7912c011e88d/02943a2bf4fe4d0a?lnk=gst&q=oauth#02943a2bf4fe4d0a

Essentially, I'm trying to check the validity of an existing OAuth
connection that has been established via the API (using PHP). It seems
the @anywhere session requires separate app approval (and creates
separate cookies), but it doesn't seem to create a separately approved
app in my Twitter settings. Here's what I'm trying with a confirmed
OAuth session via the PHP API (and the app has been approved by the
logged-in user):

twttr.anywhere(function(T){
console.log(T.isConnected());
});

This returns false, but if I do the following:

twttr.anywhere(function(T){
T.signIn();
});

and navigate my way through the approval popup, I can then re-run the
first example and it returns 'true.'

I can see from the earlier post that it was not possible to check an
existing backend session via @anywhere, but obviously @anywhere has
made some major strides since last June. Is what I'm trying to do
possible (maybe by passing in an oauth token upon T object
instantiation?), or is there a viable workaround to check the OAuth
session from the client side? Any help or insight that anyone could
provide would be most appreciated.

Thanks in advance,

-Vasken
Reply all
Reply to author
Forward
0 new messages