views:

132

answers:

0

I incorporated MGTwitterEngine in my iPhone app, with basic authentication, and have since incorporated Facebook Connect's classes for iPhone. I'm now trying to move to XAuth with MGTwitterEngine and OAuthConsumer, and I would like the user to have the same flow when tweeting as when posting on Facebook.

With Facebook Connect, I can use [session resume] which returns YES if the users login session is still valid, whereupon I get the logged in user name from the server by getting the user ID through [session uid], and sending "select name from user where uid == %lld", userID" , and thus not having to store any clear text user credentials. I then prompt my user and ask whether she or he would like to post to that user names account.

I would like to do more or less the same thing with Twitter.

Now, I don't think there is such a thing as a session in MGTwitterEngine, and I ask:

1) Is there a way of finding out whether the login session (connected to the locally stored token) is still on on?

2) Is there a way of requesting the user name related to a OAToken? Or do I have to store the user name locally?

Humbly, Ylan