2

When I programmatically share article shared article in the facebook wall top of the title says "object". How to remove that title my share code is attach here with and image also there.

Below is my code:

FB.ui({
                  method: 'share_open_graph',
                  action_type: 'og.shares',
                  action_properties: JSON.stringify({
                      object: {
                          'og:url': article_share_to, // your url to share
                          'og:title': 'Listen: ' + this.articleTitleFromPage[0]['title'],
                          'og:description': this.articleTitleFromPage[0]['title'],
                          'og:image': this.articleTitleFromPage[0]['image']
                      }
                  })

              }
VC.One
  • 14,790
  • 4
  • 25
  • 57
  • You can not remove that. At most you could specify a different _type_ of OG, then it would show that. The alternative would be to make it a normal link share, instead of using the `og.shares` Open Graph action. – CBroe Sep 13 '17 at 07:13
  • What do you mean by the "specify a different type of OG" mention any example, I have use below code block suing fb api version v2.10 but dynamic data adding it won't work, any solution for that.... FB.ui( { method: 'feed', name: 'name ', link: 'URL ', picture: ‘URL of the ima, caption: 'Caption' , description: 'Small description of the post', message: '' } – Hemantha Wijesinghe Sep 14 '17 at 11:42
  • I meant a different type of Open Graph object, sorry. And no, you can not specify these values any more at runtime using the feed or share dialog, see https://stackoverflow.com/q/43543828/1427878 – CBroe Sep 14 '17 at 12:28

1 Answers1

-2

use this code

   FB.ui({
            method: 'feed',
            link: $attr.fbUrl,
            picture: $attr.fbImage,
            caption: $attr.fbPost,
            title: $attr.fbPost,
            description: $attr.fbContent,
            message: $attr.fbContent
        }, function (response) {
        // Action after response
        });
georgeawg
  • 48,608
  • 13
  • 72
  • 95