I have implemented facebook and twitter share to my website. The users are redirected to the following URLs when they click on the twitter or facebook share button.
For Twitter call with callback, that is how I did it in Javascript:
// Include the Twitter Library
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
// On ready, register the callback...
twttr.ready(function (twttr) {
twttr.events.bind('tweet', function (event) {
// your callback action here...
});
});
The twitter link is like this:
Share on Twitter
Reference: https://dev.twitter.com/docs/intents/events