Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-21-2009, 01:26 PM   PM User | #1
nickbonich
New to the CF scene

 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
nickbonich is an unknown quantity at this point
Question Need some help with a basic Bit.Ly javascript tool

Hi guys,

Am a super-novice programmer - am in the middle of building our new website - and need some help getting a great script from Bit.Ly to work.

Code/info (from Bit.Ly) is:

********************************************

bit.ly Tweet & Track Chicklet
Make it easy for your readers to share links to your content on Twitter and track who clicks them.
Copy these two lines into the head tag of your HTML page:

<script type="text/javascript" charset="utf-8" src="http://bit.ly/javascript-api.js?version=latest&login=tweettrackjs&apiKey=R_7e9987b2fd13d7e4e881f9cbb168f523"></script>
<script type="text/javascript" charset="utf-8" src="http://s.bit.ly/TweetAndTrack.js?v=1.01"></script>

Then, add this with each item on your blog or content site:

<a href="#" onclick="return TweetAndTrack.open(this, '{Permalink}');"><span style="display:none;">Your custom message - {Title}</span>Tweet & Track</a>

Substitute whatever template tag or variable you use for permalinks for {Permalink} and your Post Title template tag for {Title}. You can also add a common custom message where it says "Your custom message - ". This example will work on Tumblr.

********************************************

I have inserted the code on my page and the link works (ie. a new Twiter window is launched with the message entered - ready to send) - but the resulting Bit.Ly url does not work. This, I am told, is due to the {Permalink} reference (for Tumblr) - which doesn't work outside a blog environment? Can anyone help me adapt the script/usage to suit a basic website?

I would really appreciate any support here - even a point in the right direction.

Thank you very much - look forward to hearing from you.
nickbonich is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:03 AM.


Advertisement
Log in to turn off these ads.