Hi,
I have been following the tip in the Wiki,
http://cwiki.apache.org/WICKET/facebook-integration.html and ran into
NullPointerException. The Login class is  exactly the class mentioned in the
Wiki.

java.lang.NullPointerException
    at org.thlim.sample.wicket.Login.<init>(Login.java:23)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    ......

I traced the code and found that the application didn't redirect as
stipulated here,

   private void forceLogin(Page page)
   {
       page.getRequestCycle().setRequestTarget(new
RedirectRequestTarget("http://www.facebook.com/login.php?api_key="; + _apiKey
+ "&v=1.0"));
   }

I presume the line of code will redirect the browser to
"http://www.facebook.com/login.php?api_key=xxxx&v=1.0"; when I logon to the
URL http://apps.facebook.com/xxx/. It didn't and it went straight to the
Login and caused the NPE. I realized that ExceptionErrorPage page was
created after it failed to be redirected to
"http://www.facebook.com/login.php?api_key=xxxx&v=1.0"; the 1st time.

If I logon manually e.g. point my browser to
http://www.facebook.com/login.php?api_key=xxxx&v=1.0, my Facebook app will
work fine. What did I do wrong?

Thanks

/lim/

-- 
View this message in context: 
http://www.nabble.com/Facebook-Wicket-Integration-tp16558748p16558748.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to