Для твиттера:
<a href='https://twitter.com/share?url=google.com&text=Signup>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='//platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','twitter-wjs');</script>
Для Facebook: вы можете использовать API метода подачи:
function streamPublish(name, hrefTitle, hrefLink, userPrompt){
FB.ui({ method : 'feed',
message: userPrompt,
link : hrefLink,
caption: hrefTitle,
picture: 'https://www.google.com/images/srpr/logo3w.png'
});
}
function publishStream(){
streamPublish("Stream Publish", "Google", "http://google.com/", "Check it out");
}