Depends how much functionality you want.
If you just want a facebook share, you could have;

        Window.open("http://www.facebook.com/sharer.php?u="+url,
"_blank","");

Where "url" is the link to be shared.
Then just trigger that on a button on your app. (which you could make
to look like a facebook link if you wished).
Many social sites provide simple url's for their sharing functions so
you dont technicaly need any special code to do that.

If you want more full intergration you probably need to inject their
script.
You can put it on the html page, but if it parses the page to add
stuff before you app loads it will probably go wrong.

You could instead do it like this;

        //Google Plus
            String s = "<g:plusone href=\"http://"+url+"\";></g:plusone>";
            InlineHTML h = new InlineHTML(s);
            this.add(h); // <--- where "this" is a container wiget that can
take the html above

           Document doc = Document.get();
           ScriptElement script = doc.createScriptElement();
          script.setSrc("https://apis.google.com/js/plusone.js";);  // <---
link to their script
          script.setType("text/javascript");
           script.setLang("javascript");
           doc.getBody().appendChild(script);




On Sep 8, 5:46 pm, Diego Places <diego.pla...@gmail.com> wrote:
> Hello everyone,
> I started programming in GWT 1 month ...... I need help ..... social
> networks like facebook, twitter, google + richiedeno to be used to
> import the javascript and then use the html simple addition of various
> buttons. Everything seems easy!. But I had big problems with GWT
> javascript injecting the fb ....
> While the exploits twitter4j with twitter I can perform some
> operations (server side and use the gwt twitter4j realized the button
> and manage the connection to the server at the click ).... but I can
> not manage in this way, the realization of all the buttons twitter.
> My question is: Is there a Methodology to integrate the functionality
> of social networks?
>
> thanks
> Diego (City Venice - Italy)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to