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.
http://www.facebook.com/sharer.php?u='+encodeURIComponent(location)+'&t='+encodeURIComponent(text)
http://twitter.com/share?url='+location+'&text='+text
I want to store the username and tweet link if possible in my database when someone the content through twitter and I want to store facebook profile url and name when someone shares it through facebook. Is it possible to retrive that data when someone has successfully completed the share process?
Best Answer
The facebook javascript API allows you to share and gives you a callback
http://developers.facebook.com/docs/reference/javascript/FB.ui/
To use this you need to have set up a facebook application and put the following code directly after the opening body tag
If you ask for basic permissions, you could then get the users facebook id and use this to store which users had shared.