Skip to main content

Introduction and Review of OAuth

Lesson 3 from: Building a Twitter App

Tony Hillerson

Introduction and Review of OAuth

Lesson 3 from: Building a Twitter App

Tony Hillerson

buy this class

$00

$00
Sale Ends Soon!

starting under

$13/month*

Unlock this classplus 2200+ more >

Lesson Info

3. Introduction and Review of OAuth

Lesson Info

Introduction and Review of OAuth

so Hello, everyone. Welcome to Android with Java, the second of this Siri's. And this is part one where we're going to you start from scratch and start building a Twitter client. So ah, this week and again, like everyone said, this is Ah, there. Five weeks left in this glass. Ah, we did the overview last week where we kind of talked about what we'll be doing and a little bit about some of the technologies will be using. And this week, the part of the application were building is the authentication piece wherein we sign in to Twitter using O off. So ah, the steps that we're gonna be dealing with today is Ah, just a little bit of an explanation about oh off again for anybody that missed it last week, I'll talk about the library that I'm using for Twitter, and then we're going to be using a android component called a Web view and kind of, Ah, a companion component or companion class that works with the Web view called a Web. You client to be able to do some interesting in and useful thing...

s with android and, uh oh, the Twitter Web application. So this first iteration of getting our app running. We're dealing with that authentication. Um, we're gonna be using a cloth, like I said, and that is an authentication scheme that offers third party application developers like like us to allow users to use some sort of online resource without the need for us to keep their password, which gives up a little bit of, ah, control from the user. So this is a better way. It's kind of the way that a lot of Web APS air going and Twitter is going to be, um, switching off other modes of signing in so that oh, author is the only option. Uh, fairly soon, I think at the end of June. So we need to We need to do that anyway. But it's also a nice, interesting bit of information. Have, as you continue your programming journey with getting interesting information off of the web, Um, we're gonna be using Twitter for J as a, which is a library, a job, a library that does pretty much everything you'd ever want to do with Twitter. Um, including signing threw off, and, ah, one of the important pieces will be dealing with is the access token today. Ah, the access token is what we use in in lieu of the password and the Web view. That's a Web browser component. You can basically put any Web browser type of a thing onto your the view of your android application. And to be able to deal with that, you can use a Web view client, which knows it's it's kind of a delegate, which means that it gets callbacks or has methods called when certain things happen on the Web view and you can hook in and implement those methods to get access to the flow of control. A certain important things happen, like the user loads a page or the user tries to log in with basic authentication or something like that. And, ah, as we build out this application, this is the set of user stories, or basically just one user story today, um, that we're gonna be implementing. The user wants to sign into Twitter so that they can use Twitter as if they were their user instead of just a any old public user. So the flow kind of goes like this were we're going to direct the user in the Web view to the Twitter sign in page, the OAS sign in page, which, which means that Twitter knows were signing in. The user is signing in using 1/3 party application, and the third party application is going to be making requests on behalf of that user. So the user signs in through the Web view. Um, and then Twitter will redirect to a certain Earl will catch that URL with the Web view, and then we'll know that the user is then authenticated on Twitter, and then we can go on to use Twitter through our own native controls. From then on, the new classes we're going to start from scratch. So the new classes are pretty much from scratch. We're gonna be creating an application which we tweet, which we created last time something that we created in the first set of these classes. We're gonna have to activities a status list activity, which will be like the main activity, an authorization activity which will deal with the sign in. And then we're gonna have this little aloft helper guy to deal with some of the some of the things that we need to do behind the scenes to get set up to sign in with the off

RELATED ARTICLES

RELATED ARTICLES