oops! posted this to the wrong group.. my bad.. sorry..

On Mon, Oct 1, 2012 at 10:34 AM, sergio_101 <[email protected]> wrote:
> the way the facebook authorization scheme works is as follows:
>
> 1. on the first go round, facebook sends a POST with some data in it
>    that needs to be parsed to pull an authorization code out of it.
> 2. if the app isn't authorized, i need to redirect to an authorization
>    dialog to so that the user can authorize my app.
> 3. once the user does that, my app receives an oauth code, and i am on
>    my way.
>
> i have everything working, except, i am not sure where to store the
> authorization code..
>
> in my main component's renderOn, it looks to see if the a instance
> variable 'oauthToken' is set. if not, it renders some javascript that
> is really just a redirect to the facebook authorization screen.
>
> once the app is authorized, 'oauthToken' is set to the correct value.
>
> then, the authorization dialog sends the request BACK to the root
> url..
>
> everything works correctly..BUT.. on the second time back, the
> redirect from facebook, it looks like it starts a brand new session
> (there is a new instance of the main component created).
>
> i was hoping that this would all be one session, and that i could just
> set an instance variable once, and not even touch the session, but i
> don't think this is going to happen. plus, it looks like i will be
> firing up a new session on return anyway, so what i have saved in
> session will be lost.
>
> anyone have any ideas on how to cleanly persist this variable after
> facebook's redirect?
>
> thanks!
>
> --
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.ThoseOptimizeGuys.com
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101



-- 
----
peace,
sergio
photographer, journalist, visionary

http://www.ThoseOptimizeGuys.com
http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

Reply via email to