Murali Bala
Murali Bala

Reputation: 1143

Facebook post via url

I am trying to send this to facebook and it works except for the title "Some Page Title" is not showing up in the post. Example

The format i am using:

https://www.facebook.com/sharer/sharer.php?u=<url>&t=<page title>

Is passing title not supported any more?

TIA

Upvotes: 0

Views: 164

Answers (1)

Adam Azad
Adam Azad

Reputation: 11297

To overwrite Open Graph meta tags you're only chance is with feed method which requires an app id

JS

$('#facebook-share').click(function (e) {
    e.preventDefault();
    FB.ui({

        method: 'feed', // feed method! 
        name: 'My title', // overwrites "og:title"
        link: 'https://www.facebook.com/Retrogram', // required param
        picture: 'http://i.imgur.com/SKwsQM2.png?1', // overwrites "og:image"
        caption: 'My caption', // overwrite caption
        description: 'My description' // overwrites "og:description"

    });
});

Fiddle

Upvotes: 1

Related Questions