Page 1 of 1

iOS Twitter Sign in Flow

Posted: Wed Feb 20, 2013 2:24 am
by jderocher14BUSNdQk
Greetings!

I'm working on an application in Livecode - if you are familiar with it - and I am currently tasked with implementing the Twitter API using the standard Mobile flow. Perhaps I am not understanding something - I will list everything I know. I'm trying to consider my options here, as I am on a very serious time crunch.

For my application, I want users to be prompted at an opening "screen 1 "to sign in with Twitter. Upon doing so, in one way or another, I want them to be directed (like the mobile sign in flow) as I either

1. (They are signed in already) [have used the app before] check the login exists, and then immediately forward them to "screen 2" of my application, or... [they have not used app] 2. ask them permissions to allow the app, and upon confirmation redirect them to "screen 2" or

2. (They are not signed in) [They have a twitter account] prompt them for their twitter user/pass and, upon successful input, forward them to option 1, or... [they don't have a twitter account] ask them to create an account etc etc.

MY QUESTION ---> I don't entirely understand how this works on a mobile application (let's say iPhone for now). Do I redirect them to a Twitter page in a browser? I didn't really think it would involve a browser, because after the authentication, do I just close the browser?

Shouldn't it just be done through an API?

As I look on the internet, I see tons of Twitter tutorials using oAuth, and I think I understand it pretty well from the developer side, but I don't get the actual user-end flow diagram, of how the user data itself is processed.

I just want to do some interacitons with the Twitter API - I had no idea this would end up being so difficult. C'est la vie, I suppose, and more power to me!

If anyone has Livecode experience, especially with Twitter, please post your thoughts.

I'm new to most of this, especially Twitter's API and oAuth. And I've only been programming for ~3 years.


Thanks so much for your time and consideration.


James

Re: iOS Twitter Sign in Flow

Posted: Wed Feb 20, 2013 2:39 am
by jderocher14BUSNdQk
And, ultimately, should I just go with an iOS external and use the Twitter iOS SDK?

Anybody have experience with this?

Re: iOS Twitter Sign in Flow

Posted: Wed Feb 20, 2013 3:09 am
by Simon
Monte is the twitter pro
http://mergext.com/home/mergsocial/


Simon

Re: iOS Twitter Sign in Flow

Posted: Wed Feb 20, 2013 3:28 am
by jderocher14BUSNdQk
I saw that extension. But is it very powerful? It just looked like it posted a status - does it prompt a sign in?

For some reason, in looking at the docs, it only worked if you were already signed in.

Re: iOS Twitter Sign in Flow

Posted: Wed Feb 20, 2013 12:33 pm
by monte
Even though I answered Jimmy on facebook I thought it's worth repeating here for the record. mergSocial uses iOS accounts so the system prompts for permission to post and asks the user to setup their account if they haven't setup twitter, Facebook or weibo before.

Re: iOS Twitter Sign in Flow

Posted: Thu Feb 21, 2013 1:06 am
by jekyllandhyde
Monte, do you have any code that will just present tweets on an iphone screen of someone you follow? Willing to pay.

Example.
We have a twitter account we use for news about our App.
I would like to be able to present the user with a screen that shows our recents tweets in a list view on the page. It would be hardcoded to one specific @twitter account.

Thx.

Re: iOS Twitter Sign in Flow

Posted: Fri Feb 22, 2013 6:38 am
by monte
I think Andre's social suite could handle this.

Currently you can just do this:

put url "http://api.twitter.com/1/statuses/user_ ... tegoulding" into tJSON

then parse it.

Unfortunately twitter api 1.1 changes a few things and it looks like it requires authentication to do the above.

Andre? Are you on top of that?

Anyway, It's likely I'll do a more comprehensive external for twitter and Facebook at some point. Not to compete with what Andre has done but we can't access the account store in a LC only solution which means instead of iOS asking the user's permission for twitter in the normal way we need to fake it all with web view etc. I thought I might be able to integrate with what Andre had done but it doesn't look like that's possible. If you want to use the accounts store then you need to use the social framework...

It looks like you and Jimmy at least need this... any others?

Re: iOS Twitter Sign in Flow

Posted: Wed Feb 27, 2013 8:46 pm
by jekyllandhyde
I contacted Andre but unfortunately he doesn't have it. I guess I am out of luck.

Re: iOS Twitter Sign in Flow

Posted: Thu Feb 28, 2013 2:33 am
by monte
Contact me off list if you are interested in me extending the social framework external