Created
December 17, 2012 23:38
-
-
Save boertel/4323485 to your computer and use it in GitHub Desktop.
Invite Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type='text' name='invite'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.ptReady.push(function () { | |
PT.referral.getUrl("<URL YOU WANT TO SHARE>", function (urls) { | |
// urls is an object containing: longUrl and shortUrl | |
$("input[name=invite_friends]").val(urls.shortUrl); | |
}, | |
true); // ask for a shorten version of the url | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment