Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I fixed it via Event.COMPLETE for my Droid 2 and Nexus One. I'm not even getting a LocationChangeEvent.LOCATION_CHANGING on my desktop nor Android, but bottom line, Event.COMPLETE does get the oauth_verifier sha'd pin in it. I can parse that out of StageWebView's location property, submit, and I'm good to go. Out of paranoia, I'm leaving all 3 events in there just in case. If you're curious, here's the redirect event differences between OS's via Mark Lochrie: <a href="http://kb2.adobe.com/cps/895/cpsid_89526.html" rel="nofollow">http://kb2.adobe.com/cps/895/cpsid_89526.html</a>.</p> <p>Also, it's assumed your application is actually registered as a "web application", and not a desktop application, otherwise, you'll be forced to use a pin, and you won't get the oauth_verifier in the response URL. Yes, you can make up a callback URL to whatever you want; just make sure it's a standard URL that hopefully doesn't 404.</p> <pre><code>stageWebView = new StageWebView(); stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGING, onLocationChange); stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, onLocationChange); stageWebView.addEventListener(Event.COMPLETE, onLocationChange); stageWebView.stage = stage; stageWebView.viewRect = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight); // loaded from an OAuth library // try http://code.google.com/p/oauth-as3/ or Tweetr http://wiki.swfjunkie.com/tweetr stageWebView.loadURL(authenticationURL); var code:String; function onLocationChange(event:Event):void { var location:String; if(event is LocationChangeEvent) { location = LocationChangeEvent(event).location; } else { location = _stageWebView.location; } var search:String = "oauth_verifier="; var ver:String = location; var startIndex:int = ver.lastIndexOf(search); if(startIndex != -1) { code = ver.substr(startIndex + search.length, location.length); // remove listeners and dispatch success here } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload