Created
July 19, 2013 16:57
-
-
Save ryanschuhler/6040684 to your computer and use it in GitHub Desktop.
Script version of Social Bookmarks
This file contains hidden or 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
<!-- Facebook --> | |
<script src='http://connect.facebook.net/en_US/all.js'></script> | |
<script> | |
FB.init({appId: "XXXXXXXXXXXXXXX", status: true, cookie: true}); | |
function postToFeed(redirectUri, link, name, caption, description) { | |
// calling the API ... | |
var obj = { | |
method: 'feed', | |
redirect_uri: redirectUri, | |
link: link, | |
picture: 'http://www.liferay.com/osb-community-theme/images/custom/facebook_link.png', | |
name: name, | |
caption: caption, | |
description: description | |
}; | |
function callback(response) { | |
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id']; | |
} | |
FB.ui(obj, callback); | |
} | |
</script> | |
<a onclick="postToFeed('http://www.liferay.com/about-us/careers', 'http://www.liferay.com/about-us/careers', 'Title Name', 'Caption Phrase', 'This is the description'); return false;" href="javascript:;">Post to Feed</a> | |
<!-- Twitter --> | |
<a class="twitter-share-button" data-lang="en" data-text="Here is the data text" data-url="http://www.liferay.com/about-us/careers" href="https://twitter.com/share">Tweet</a> | |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> | |
<!-- LinkedIn --> | |
<script src="//platform.linkedin.com/in.js" type="text/javascript">lang: en_US</script> | |
<script type="IN/Share" data-counter="right" data-onsuccess="LinkedInShare" data-url="http://www.liferay.com/about-us/careers"></script> | |
<!-- Google Plus --> | |
<div class="g-plus" data-action="share" data-annotation="bubble" data-url="http://www.liferay.com/about-us/careers"></div> | |
<script type="text/javascript"> | |
(function() { | |
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | |
po.src = 'https://apis.google.com/js/plusone.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment