Facebook and google +1 plugins problem


I’m trying to add a facebook and a +1 plugin to my web, but i’m having a problem.

facebookLabel = new Label("<div>" +
				"<fb:like href=\"" + url + "\" layout=\"button_count\" send=\"false\" " +
				"show_faces=\"false\" width=\"180\" font=\"\"></fb:like></div>");

googleMas1Label = new Label(
				"<div><g:plusone size='medium' href='APP_URL'></g:plusone></div>");

Sometimes the plugins show up, but most of the time they don’t. When they show up the plugins work just fine. I’ve tried with XFBML and iframe (facebook plugin), but both do the same. Any ideas?

Looking further into the problem, i’m seeing in firebug that when the plugin show up, the html element “<fb:like…” is shown normal, but when it doesn’t, it is shown as blurred html element.

Anyone knows what’s the meaning of blurred html elements in firebug?

See images, image “1” is when the facebook plugin isn’t shown and image “2” is when it does.

I’ve solved the problem creating an html with streamresource and embedded component.

Now as related in
post i want to add meta tags to my html page, but i don’t know how, any ideas? someone have used facebook open graph inside a vaadin application? My application needs different meta tags depending on uri fragments.

if i could get the uri fragment inside writeAjaxPageHtmlHeader method, i could generate the meta tags inside it, but “request.getRequestURL()” doesn’t contains it.

This is quite difficult as browsers does not communicate URI fragments to the server - they consider them internal to the page. Fragments could be read and communicated using JavaScript as Vaadin URIFragmentUtility etc. do, but when constructing the page, nothing (no HTML, JavaScript etc.) has been sent to the client.

The only solution I can think of right now would be to first serve a small “loader” page that has js on it that just asks for the real page and includes information about URI fragments.