Facebook上的图像共享页面

My webpage has an image slider. Each image comes with a FB share button. When i click on a share button i want the particular image to get posted along with the current URL. I have used the script below:

<script type="text/javascript">
function fbShare(url, title, descr, image, winWidth, winHeight) {
var winTop = (screen.height / 2) - (winHeight / 2);
var winLeft = (screen.width / 2) - (winWidth / 2);
window.open('http://www.facebook.com/sharer.php?s=100&p[title]=' + title + '&p[summary]=' + descr + '&p[url]=' + url + '&p[images][0]=' + image, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width='+winWidth+',height='+winHeight);
}
</script>

But it does not select the image and is selecting some random text instead of the text in page body.

Please help. Thanks in advance.

sharer.php only takes the URL as parameter, all other data (title, image, ...) will come from the Open Graph tags of that URL:

https://www.facebook.com/sharer/sharer.php?u=encodedurl

More information about Open Graph tags: