Well everything seems fine if I injected the script after the anchor is created. The problem now is that the tweets counts are always equal for different urls, and I believe that maybe due to the twitter doesn't consider example.com/#1 different than example.com/#2.
Do you know how can I fix that? On Wed, May 15, 2013 at 3:26 PM, Thomas Broyer <[email protected]> wrote: > > > On Wednesday, May 15, 2013 11:18:48 AM UTC+2, Mohammad Al-Quraian wrote: >> >> Hi Thomas, >> >> The ScriptInjector only works 1% of the times, however this: >> >> Document doc = Document.get(); >> >> ScriptElement script = doc.createScriptElement(); >> >> script.setSrc("http://**platform.twitter.com/widgets.**js >> <http://platform.twitter.com/widgets.js>"); >> >> script.setType("text/**javascript"); >> >> script.setLang("javascript"); >> >> doc.getBody().appendChild(scri**pt); >> >> works 100%, do you have any idea why? >> > > You mean > > ```java > ScriptInjector.fromUrl("http://platform.twitter.com/widgets.js") > .setWindow(ScriptInjector.TOP_WINDOW) > .inject(); > ``` > > ? or the one I gave earlier in this thread? > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Web Toolkit" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/TjN9oGZlLag/unsubscribe?hl=en > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
