| Package | com.swfjunkie.tweetr.oauth |
| Class | public class OAuth |
| Inheritance | OAuth flash.events.EventDispatcher |
| Implements | IOAuth |
| Property | Defined by | ||
|---|---|---|---|
| callbackURL : String
NEW - Get/Set the OAuth Callback URL
| OAuth | ||
| consumerKey : String = ""
Get/Set the Consumer Key for your Application
| OAuth | ||
| consumerSecret : String = ""
Get/set the Consumer Secret for your Application
| OAuth | ||
| htmlLoader : HTMLLoader NEW - AIR only! The HTMLLoader to be used to display the OAuth
Authentication Process from Twitter in.
| OAuth | ||
| oauthToken : String = ""
Get/Set the User Token
| OAuth | ||
| oauthTokenSecret : String = ""
Get/Set the User Token Secret
| OAuth | ||
| pinlessAuth : Boolean = false
NEW - Whether to use pinless OAuth or not.
If you set this to true, you will have to supply a callback url via callbackURL
| OAuth | ||
| serviceHost : String
Service Host URL you want to use.
| OAuth | ||
| userId : String [read-only]
Get the twitter user_id (retrieval only available after successful user authorization)
| OAuth | ||
| username : String
Get/set the twitter screen_name (retrieval only available after successful user authorization)
| OAuth | ||
| Method | Defined by | ||
|---|---|---|---|
|
OAuth()
Creates a new OAuth Instance
| OAuth | ||
|
getAuthorizationRequest():void
Requests a OAuth Authorization Token and will build the proper authorization URL if successful.
| OAuth | ||
|
getSignedRequest(method:String, url:String, urlVars:URLVariables = null):String
Signs a Request and returns an proper encoded argument string.
There usually is no need to call this by yourself. | OAuth | ||
|
requestAccessToken(verifier:String):void
Requests the final Access Token to finish the OAuth Authorization.
| OAuth | ||
|
toString():String
NEW - Returns username, userid, oauth token
and secret in a practical string ;)
| OAuth | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the OAuth has succesfully completed a Request. | OAuth | |||
| Dispatched when something goes wrong while trying to authorize | OAuth | |||
| callbackURL | property |
callbackURL:String [read-write]NEW - Get/Set the OAuth Callback URL
Implementation public function get callbackURL():String
public function set callbackURL(value:String):void
| consumerKey | property |
public var consumerKey:String = ""Get/Set the Consumer Key for your Application
| consumerSecret | property |
public var consumerSecret:String = ""Get/set the Consumer Secret for your Application
| htmlLoader | property |
public var htmlLoader:HTMLLoader
| oauthToken | property |
public var oauthToken:String = ""Get/Set the User Token
| oauthTokenSecret | property |
public var oauthTokenSecret:String = ""Get/Set the User Token Secret
| pinlessAuth | property |
public var pinlessAuth:Boolean = false
NEW - Whether to use pinless OAuth or not.
If you set this to true, you will have to supply
a callback url via callbackURL
| serviceHost | property |
serviceHost:String [read-write]Service Host URL you want to use. This has to be changed if you are going to use tweetr from a web app. Since the crossdomain policy of twitter.com is very restrictive. use Tweetr's own PHPProxy Class for this.
Implementation public function get serviceHost():String
public function set serviceHost(value:String):void
| userId | property |
userId:String [read-only]Get the twitter user_id (retrieval only available after successful user authorization)
Implementation public function get userId():String
| username | property |
username:String [read-write]Get/set the twitter screen_name (retrieval only available after successful user authorization)
Implementation public function get username():String
public function set username(value:String):void
| OAuth | () | constructor |
public function OAuth()Creates a new OAuth Instance
| getAuthorizationRequest | () | method |
public function getAuthorizationRequest():void
Requests a OAuth Authorization Token and will build the proper authorization URL if successful.
When the URL has been created a OAuthEvent.COMPLETE will be fired containing the url.
| getSignedRequest | () | method |
public function getSignedRequest(method:String, url:String, urlVars:URLVariables = null):String
Signs a Request and returns an proper encoded argument string.
There usually is no need to call this by yourself.
method:String — The URLRequest Method used. Valid values are POST and GET
|
|
url:String — The Request URL
|
|
urlVars:URLVariables (default = null) — URLVariables that need to be signed
|
String |
| requestAccessToken | () | method |
public function requestAccessToken(verifier:String):void
Requests the final Access Token to finish the OAuth Authorization.
When the Request succeeds a OAuthEvent.COMPLETE will be fired and the OAuth Instance will contain all the information needed to successfully call any Twitter API Method.
verifier:String — PIN or verifier_token given by Twitter on the Authorization Page.
|
| toString | () | method |
public override function toString():StringNEW - Returns username, userid, oauth token and secret in a practical string ;)
ReturnsString |
| complete | event |
com.swfjunkie.tweetr.oauth.OAuthEvent
com.swfjunkie.tweetr.oauth.events.OAuthEvent.COMPLETE
Dispatched when the OAuth has succesfully completed a Request.
The event returns the following properties:
| Property | Value |
|---|---|
| url | Returns the Authorization URL when getAuthorizationRequest() was successful. |
| error | event |
com.swfjunkie.tweetr.oauth.OAuthEvent
com.swfjunkie.tweetr.oauth.events.OAuthEvent.ERROR
Dispatched when something goes wrong while trying to authorize
The event returns the following properties:
| Property | Value |
|---|---|
| text | Contains an error message |