You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Benny Weingarten <be...@myworklight.com> on 2008/08/06 14:44:31 UTC

Re: Facebook Wicket Integration

I am also trying to have restful URLs for my facebook application.

I have tried to follow the instruction here, but I got to a dead end. Here
is my declaration inside MyApp.java.init():

    	QueryStringUrlCodingStrategy page1URLS = new
QueryStringUrlCodingStrategy(
    			"page1",
                Page1.class
        );
        mount(page1URLS);

        QueryStringUrlCodingStrategy page2URLS = new
QueryStringUrlCodingStrategy(
        		"http://apps.facebook.com/myapp/page2",
                Page2.class
        );
    	mount(page1URL2);


my application is run in an IFrame in facebook. when I use a
BookmarkablePageLink to link to page1 and page2, I get the following urls:
page1: http://localhost:8080/some-directory/page1?some_param=29
page2: http://apps.facebook.com/bennyworkbook/page2?some_param=2

clicking page1 link works perfectly. however, If the link is bookmarked or
saved by the user, and accessed later, the application is loaded outside the
facebook realm. I would like the links to all point to facebook, so
bookmarking them would link to my application's page ON FACEBOOK.

page2 link looks perfect, because it links to facebook. However, it doesn't
work. I get a 4040 with the following error:
"The requested resource (/page2) is not available."

any ideas how I can have all the links look like page2 link but work good
(link page1 link)?

thanks,
Benny.


caoanhkiet wrote:
> 
> Hi,
> I have been following
> http://cwiki.apache.org/WICKET/facebook-integration.html and version
> tomcat 5.5.25. and ran NullPointerException.
> 
> error at: client.friends_get();
> 
> SEVERE: Can't instantiate page using constructor public Login()
> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
> constructor public Login()
> 	at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
> 	at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
> 	at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:92)
> 	at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268)
> 	at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
> 	at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
> 	at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
> 	at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
> 	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
> 	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
> 	at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> 	at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
> 	at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Facebook Wicket Integration

Posted by Benny Weingarten <be...@myworklight.com>.
Thanks Cao, but I don't see how this helps me.

Let me further explain my situation. 
1) I need to display links to the users of my facebook application. These
links are DYNAMIC, so I can't put them in the markup. I have to use some
sort of wicket Link component.

2) In your example, the URLs are relative URLs, as opposed to the absolute
URLs that I want to display to the user.

In my application, all the links (currently) are relative links, i.e. when I
hover over the link when the application is running in facebook, the URL
displayed at the bottom left corner of the screen is:
http://<my-server-doamin>/<page-address>
But I would want them to be:
http://apps.facebook.com/<application-name>/<page-address>

My trouble with achieving this is described at my previous post on this
thread. Any further assistance on this matter would be appreciated.

thanks,
Benny.


caoanhkiet wrote:
> 
> I think you had come to
> http://wiki.developers.facebook.com/index.php/FBML.
> My demo use FBML's tab, for example:
> <fb:tabs>
>   <fb:tab-item href="?wicket:bookmarkablePage=%3Areno.GuestBook" title='Go
> GuestBook' />
>   <fb:tab-item href="?wicket:bookmarkablePage=%3Areno.Invite"
> title='Invite' />
> </fb:tabs>
> my package is src\reno that include all my page.
> 
> Sender
> Cao Anh Kiet
> website: http://www.renovationsoft.com
> 
> 
> Benny Weingarten wrote:
>> 
>> I am also trying to have restful URLs for my facebook application.
>> 
>> I have tried to follow the instruction here, but I got to a dead end.
>> Here is my declaration inside MyApp.java.init():
>> 
>>     	QueryStringUrlCodingStrategy page1URLS = new
>> QueryStringUrlCodingStrategy(
>>     			"page1",
>>                 Page1.class
>>         );
>>         mount(page1URLS);
>> 
>>         QueryStringUrlCodingStrategy page2URLS = new
>> QueryStringUrlCodingStrategy(
>>         		"http://apps.facebook.com/myapp/page2",
>>                 Page2.class
>>         );
>>     	mount(page1URL2);
>> 
>> 
>> my application is run in an IFrame in facebook. when I use a
>> BookmarkablePageLink to link to page1 and page2, I get the following
>> urls:
>> page1: http://localhost:8080/some-directory/page1?some_param=29
>> page2: http://apps.facebook.com/bennyworkbook/page2?some_param=2
>> 
>> clicking page1 link works perfectly. however, If the link is bookmarked
>> or saved by the user, and accessed later, the application is loaded
>> outside the facebook realm. I would like the links to all point to
>> facebook, so bookmarking them would link to my application's page ON
>> FACEBOOK.
>> 
>> page2 link looks perfect, because it links to facebook. However, it
>> doesn't work. I get a 4040 with the following error:
>> "The requested resource (/page2) is not available."
>> 
>> any ideas how I can have all the links look like page2 link but work good
>> (link page1 link)?
>> 
>> thanks,
>> Benny.
>> 
>> 
>> caoanhkiet wrote:
>>> 
>>> Hi,
>>> I have been following
>>> http://cwiki.apache.org/WICKET/facebook-integration.html and version
>>> tomcat 5.5.25. and ran NullPointerException.
>>> 
>>> error at: client.friends_get();
>>> 
>>> SEVERE: Can't instantiate page using constructor public Login()
>>> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
>>> constructor public Login()
>>> 	at
>>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
>>> 	at
>>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
>>> 	at
>>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:92)
>>> 	at
>>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268)
>>> 	at
>>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
>>> 	at
>>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
>>> 	at
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>>> 	at
>>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
>>> 	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
>>> 	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
>>> 	at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>>> 	at
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
>>> 	at
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>>> 	at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>> 	at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>> 	at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>> 	at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>>> 	at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>> 	at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>> 	at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>> 	at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>>> 	at
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>>> 	at
>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>> 	at
>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>> 	at
>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>> 	at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>>> 
>> 
>> 
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Facebook Wicket Integration

Posted by caoanhkiet <ca...@gmail.com>.
I think you had come to http://wiki.developers.facebook.com/index.php/FBML.
My demo use FBML's tab, for example:
<fb:tabs>
  <fb:tab-item href="?wicket:bookmarkablePage=%3Areno.GuestBook" title='Go
GuestBook' />
  <fb:tab-item href="?wicket:bookmarkablePage=%3Areno.Invite" title='Invite'
/>
</fb:tabs>
my package is src\reno that include all my page.

Sender
Cao Anh Kiet
website: http://www.renovationsoft.com


Benny Weingarten wrote:
> 
> I am also trying to have restful URLs for my facebook application.
> 
> I have tried to follow the instruction here, but I got to a dead end. Here
> is my declaration inside MyApp.java.init():
> 
>     	QueryStringUrlCodingStrategy page1URLS = new
> QueryStringUrlCodingStrategy(
>     			"page1",
>                 Page1.class
>         );
>         mount(page1URLS);
> 
>         QueryStringUrlCodingStrategy page2URLS = new
> QueryStringUrlCodingStrategy(
>         		"http://apps.facebook.com/myapp/page2",
>                 Page2.class
>         );
>     	mount(page1URL2);
> 
> 
> my application is run in an IFrame in facebook. when I use a
> BookmarkablePageLink to link to page1 and page2, I get the following urls:
> page1: http://localhost:8080/some-directory/page1?some_param=29
> page2: http://apps.facebook.com/bennyworkbook/page2?some_param=2
> 
> clicking page1 link works perfectly. however, If the link is bookmarked or
> saved by the user, and accessed later, the application is loaded outside
> the facebook realm. I would like the links to all point to facebook, so
> bookmarking them would link to my application's page ON FACEBOOK.
> 
> page2 link looks perfect, because it links to facebook. However, it
> doesn't work. I get a 4040 with the following error:
> "The requested resource (/page2) is not available."
> 
> any ideas how I can have all the links look like page2 link but work good
> (link page1 link)?
> 
> thanks,
> Benny.
> 
> 
> caoanhkiet wrote:
>> 
>> Hi,
>> I have been following
>> http://cwiki.apache.org/WICKET/facebook-integration.html and version
>> tomcat 5.5.25. and ran NullPointerException.
>> 
>> error at: client.friends_get();
>> 
>> SEVERE: Can't instantiate page using constructor public Login()
>> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
>> constructor public Login()
>> 	at
>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
>> 	at
>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
>> 	at
>> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:92)
>> 	at
>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268)
>> 	at
>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
>> 	at
>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
>> 	at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
>> 	at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
>> 	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
>> 	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
>> 	at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>> 	at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
>> 	at
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>> 	at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>> 	at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> 	at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> 	at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>> 	at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> 	at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>> 	at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>> 	at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>> 	at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>> 	at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>> 	at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>> 	at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>> 	at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>> 
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org