adding facebook share button in gwt application -


i have been working gwt , gxt since around few months,

i working on web site needs interact social media web site facebook,

i trying add fcebook share button in web site , tried below way -

i tried using html -

    html facebookbutton = new html();                     facebookbutton.sethorizontalalignment(hashorizontalalignment.align_center);  facebookbutton.sethtml("<div class=\"fb-share-button\" data-href=\"https://developers.facebook.com/docs/plugins/\" data-layout=\"button\" data-size=\"small\" data-mobile-iframe=\"true\"><a class=\"fb-xfbml-parse-ignore\" target=\"_blank\" href=\"https://www.facebook.com/sharer/......src=sdkpreparse\"> <img src=\"img/social/facebook.png\"  > </a></div>"); 

but nothing -

tab.geturlheader() - want share

i searched across , not find .

is possible create such button in gwt/gxt way ..?

any appreciated

facebookbutton.sethtml("<div class=\"fb-share-button\" data-href=\"https://developers.facebook.com/docs/plugins/\" data-layout=\"button\" data-size=\"small\" data-mobile-iframe=\"true\"><a class=\"fb-xfbml-parse-ignore\" target=\"_blank\" href=\"https://www.facebook.com/sharer/......src=sdkpreparse\"> <img src=\"img/social/facebook.png\"  > </a></div>"); 

i think copied facebook share button -

this correct , can't understand why not working you.

you can try iframe approach. simple , easy.

i guess have created facebook app id developer account.

go page -

https://developers.facebook.com/docs/plugins/share-button 

enter image description here

then enter url want share -

url share

also choose layout , button size -

layout- button size-

then click on code - pop up.

in pop go iframe tab - , copy iframe element.

then can set in html label in gwt this.

facebookbutton.sethtml("<iframe src=\"https://www.facebook.com/plugins/share_button.php?href=......"); 

let me know if works


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -