Tweet Box Current Page URL

54 views
Skip to first unread message

A. Scott

unread,
May 12, 2011, 10:27:35 AM5/12/11
to Twitter Anywhere Development
Using the Tweet Box, is there a way to include the url of the current
page? I realize you could add it to the default content, but I'd
prefer not to display too much content within the tweet box.

For reference, here is the site I am creating:

http://whatgoodtoday.com/

Thank you!

Daniel Chenery

unread,
May 19, 2011, 12:39:30 PM5/19/11
to Twitter Anywhere Development
You can include the URL of the current page via defaultContent (As you
suggest).
I think using JS to get the current page would to be like this

<script type="text/javascript">
twttr.anywhere(function (T) {
T("#tbox").tweetBox({
height: 100,
width: 400,
defaultContent: function(){
window.location.href
}
});

});
</script>

Other than the tweet box, I've no idea where you would place the URL
of the page.
Reply all
Reply to author
Forward
0 new messages