That's where I'm headed right now.  I had a signin page with PageParameters
that picked it up by accident...  I think I'm headed in the right direction
now.

I'll post my solution when I get it finished.  I'd still be interested to
see your solution also.

Thanks again.

_______________________________________
Stephen Walsh | http://connectwithawalsh.com


On Mon, Feb 18, 2013 at 6:29 PM, Michael Chandler <
michael.chand...@onassignment.com> wrote:

> > The browser gets a token back that makes perfect sense and the example
> is completed.
> > How do I "consume" the token?  I'll play around with it a bit and let
> you know what
> > I come up with.  Thanks for the help.
>
> Based on the path I was taking, the redirect URI is the key.  Facebook
> redirects as such:
>
> YOUR_REDIRECT_URI?
>     access_token=USER_ACCESS_TOKEN
>    &expires_in=NUMBER_OF_SECONDS_UNTIL_TOKEN_EXPIRES
>    &state=YOUR_STATE_VALUE
>
> Of course, if the request fails authentication, they redirect as follows:
>
> YOUR_REDIRECT_URI?
>     error_reason=user_denied
>    &error=access_denied
>    &error_description=The+user+denied+your+request.
>    &state=YOUR_STATE_VALUE
>
> So your redirect page could start out like this:
>
> public class FacebookResponseListener extends WebPage {
>
>         private static final long serialVersionUID = 1L;
>
>         public FacebookResponseListener(PageParameters params) {
>                 // if there is an error, handle it
>                 if (params.get("error_reason") != null) {
>                         // handle the error here!
>                 } else {
>                         String accessToken =
> params.get("access_token").toString();
>                         int expiresIn = params.get("expires_in").toInt();
>
>                         // etc... etc...
>
>                 }
>
>         }
> }
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to