I need to add facebook twitter and google +1 button to a dynamically generated web page.
I am explaining my use case here:
User comes to my web portal which is a java/j2ee based web portal and adds few content (e.g. name,address, company, designation, place and also his picture.)
Then, I am generating a page like facebook profile page, http://www.mydomain.com/user_name.
So my goal is to add his contents along with the url and picture to his/her facebook wall using facebook share button.
I went through few codes that I got, one simple example is:
<a href="javascript:window.location=%22http://www.facebook.com/sharer.php?u=%22+encodeURIComponent(document.location)+%22&t=%22+encodeURIComponent(document.title)" title="Share on Facebook..."><img src="/path/to/your/image/" width="12" height="12" alt="alt" /></a>
Can I enhance the same code to get my needs done? Also I need to twitter the same content. But I am not able to do it dynamically. How do I do that? Any reference or tutorials or code sample would be helpful.
This will work