How to share content of my website on facebook
facebook, facebook-graph-api, php
Solution
Finally I got my solution.This is actual code that is doing job for me . I was mis handleing ?u of my link.It should be like this
?u=http%3A%2F%2Fmywebsite.com%2Fcontent+of+my+page" target="_blank">this link</a>
Problem
I have a website and on that I have a facebook button named as share. I want that when user clicks on that button the content of my webpage should share on his wall. My code is like this in my head tag of page: ``` <script> function fbs_click(){ u = location.href; t = document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false; } </script> ``` I also know that `u= url` of your content page `t= title` or site name and this is inside the body tag: ``` <a rel="nofollow" href="http://www.facebook.com/share.php?u=http://lums.edu.pk/event-detail/lecture-on-citation-management-and-referencing-1133" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a> ``` ?u is the link I want to share. This code open a share page for me, and share just my url not the content of my page. My content includes an image, tittle and detail (I'm fetching these values from database table). Please some one help me.