1

Sorry I Try to search for this error and no result i try to use facebook feed dialog to share page post from my app here is my code

     function shareOnFacebook() {
FB.ui(
  {
    method        : 'feed',
    display       : 'popup',
    link : "http://www.facebook.com/photo.php?fbid=176944625849315",
  },
  function(response) {
    if (response && response.post_id) {

      // HERE YOU CAN DO WHAT YOU NEED
      console.log('OK! User has published on Facebook.');

    } else {
      console.log('Post was not published.');
    }
  }
);

}

I get error

API Error Code: 1

API Error Description: An unknown error occurred

Error Message: kError 1349117: Attachment Link Invalid: Link data invalid. Link data must have string 'href' and 'text' attributes

and When I try add Picture with facebook path then try to run agin i got blank popup

any help please ?

user3213240
  • 193
  • 1
  • 3
  • 11
  • 2
    You can not share content on facebook.com using the feed dialog. Try using the Share button instead: https://developers.facebook.com/docs/plugins/share-button – CBroe Feb 12 '14 at 14:08

2 Answers2

0

Posting CBroe's comment as it seems to be the answer...

You can not share content on facebook.com using the feed dialog. Try using the Share button instead: developers.facebook.com/docs/plugins/share-button – CBroe

(Please +1 the comment.)

Dunc
  • 18,404
  • 6
  • 86
  • 103
-1

Your call is wrong. At the end of link : "http://www.facebook.com/photo.php?fbid=176944625849315", there should be no comma. Here is the correct code:

function shareOnFacebook() {
    FB.ui(
      {
        method        : 'feed',
        display       : 'popup',
        link : "http://www.facebook.com/photo.php?fbid=176944625849315"
      },
      function(response) {

      }
);
Fabio Costa
  • 213
  • 3
  • 8