Cannot display Facebook Like or Send button in GWT

333 views
Skip to first unread message

simplyi

unread,
Aug 8, 2011, 2:27:51 PM8/8/11
to Google Web Toolkit
Hello!

I am having hard time getting Facebook Like or Send button to display
on GWT popup panel. Both buttons display and work well outside of GWT.
But do not get displayed on GWT panels.

To display Facebook button I use HTML panel:

HTML sendButton = new HTML();
sendButton.setHTML("<div id=\"fb-root\"></div><fb:send href=
\""+linkToPhoto+"\" font=\"arial\"></fb:send>");
right_side_flowPanel.add(sendButton);

Facebook JavaScript and Meta tags are included above on page withing
<header> tag.

Please advise me how to get it fixed.

Thank you very much.

dreamer

unread,
Aug 10, 2011, 1:31:11 AM8/10/11
to Google Web Toolkit
Integrating GWT and Closure makes lot of sense.
GWT is lacking on the server side template-ing.
Closure needs cross compiler like GWT.

BST

unread,
Aug 10, 2011, 7:17:37 AM8/10/11
to google-we...@googlegroups.com
Shouldn't the </div> tag be after the </fb:send> tag?


simplyi

unread,
Aug 10, 2011, 12:35:06 PM8/10/11
to Google Web Toolkit
Babu Sriram, thank you very much for your message.

No, the </div> tag should go before </fb:send> tag. Complete
Facebook tag example is here:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/
all.js#appId=265566776791725&amp;xfbml=1"></script><fb:like
href="http://www.kindlies.com/interesting-photos.php" send="true"
width="450" show_faces="false" font=""></fb:like>

The above code does work on the same html page but outside of GWT.
When I inspect UI using Firebug or Chrome tools I see that Facebook
tags are properly inserted into html structure and should display
well. No other elements or css on the page prevents them from
displaying. There is also enough space around so the Like button
cannot be covered by other panels. But it does not work :(....

I wonder if anyone has ever succeeded getting Facebook buttons display
on GWT Panels?


Thank you very much and I am very hopeful for more insights on how to
fix the problem.

Sergey

BST

unread,
Aug 11, 2011, 7:45:41 AM8/11/11
to google-we...@googlegroups.com
Probably you may find something in this

https://groups.google.com/d/topic/google-web-toolkit/XK0L5uiKh1A/discussion

http://code.google.com/p/gwtfb/

I noticed they were using anchors etc.

Sergey Kargopolov

unread,
Aug 11, 2011, 12:57:17 PM8/11/11
to google-we...@googlegroups.com
Thank you very much for your reply.

I have looked at gwtfb earlier and it looks like a very good solution for sending requests to Facebook API and implementing custom features. But I need to use Facebook Send button as it is. I do not want to reimplement the FB Send button UI using GWT and send requests to Facebook via gwtfb.

I wonder why FB Send button does not appear even though in generated HTML source it looks like GWT HTML panel does it's job and inserts FB tags correctly.


Sergey
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/x2DRtgSjI44J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com <google-web-toolkit%2Bunsu...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>

sheamus

unread,
Sep 17, 2011, 2:59:33 PM9/17/11
to Google Web Toolkit
Did you find a solution to this? I just need the like button too and
am having the same issue. gwtfb seems overkill for one button.

I'm trying to use the 'html5' source generated from this page
http://developers.facebook.com/docs/reference/plugins/like/

Reply all
Reply to author
Forward
0 new messages