javascript - how to share a url with # in twitter using tweet_button.html -


i have twitter img onclick function tweetpage

<img src="images/twtr.png" onclick="tweetpage();"/>

function tweetpage() {   var url = "http://www.website.com/index.html#eyjkijoidghpcybpcybh";   var testurl ="https://platform.twitter.com/widgets/tweet_button.html?url="+url   var htmlstr = '<iframe allowtransparency="true" frameborder="0" scrolling="no"'               +'src="'+testurl+'"'               +'style="width:130px; height:20px;padding-top: 37%;"></iframe>'   $('#twitlinddiv').html(htmlstr); } 

and tweetbutton shown. clicking on tweet button twitter popup box shown url in textbox contains only

http://www.website.com/index.html

how can solve this.

i tried

&hashtags= instead of #

the result was

http://www.website.com/index.html #eyjkijoidghpcybpcybh

how can solve this


tweetid div inner html added (this works fine me.)

var referenceurl = window.location.tostring(); var shareurl = 'http://www.website.com/index.html#eyjkijoidghpcybpcybh' $('#tweetid').html('<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.1368146021.html#_=1369640770351&amp; count=none&amp; id=twitter-widget-0&amp; lang=en&amp;original_referer=' +encodeuricomponent(referenceurl) +'&amp;related=nothing%20to%20worry&amp;size=m&amp; text=liveimpact&amp; url='+encodeuricomponent(shareurl) +'" class="twitter-share-button twitter-count-none" title="twitter tweet button" data-twttr-rendered="true" style="width: 56px; height: 20px;">' +'</iframe>'); 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -