Share title, description and image on Facebook

The following code will help you share custom details to facebook page.

link : Use the url to be shared in facebook so that clicking on the url will take the user to the intended page.
picture : Image to be shared.
name : title of the facebook share.
description : Description of the content to be shared.

var feedObj = {
    method: 'feed',
    link: '',
    picture: '',
    name: 'name',
    caption: 'caption',
    description: 'description',
    actions: [
        { name: 'text', link: '' }
function callback(response) {
FB.ui(feedObj, callback);

Leave a Reply

Your email address will not be published. Required fields are marked *