skip to Main Content

im using this code

var shareurl = FullURL to the Site;
var shareimage = FullURL to a image;
  $(".FB-share").on('click', function(e) {
    var shareEntry = {
      'method': 'feed',
      'link': shareurl,
      'picture': shareimage,
      'name': 'My Share Name',
      'caption': 'My Caption Text',
      'description': 'My Description Text'
    };
    console.log(shareEntry);
    FB.ui(shareEntry);
  });

  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'XXXXXX',
      xfbml      : true,
      version    : 'v2.9'
    });
    FB.AppEvents.logPageView();
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));

With a click, the Feed Dialogs opens, but the values from the FB Object are not getting displayed. IN the Facebook Dialog i get text and images from the Page itself.

I dont understand this, because we have another website with the exact same code, and everything is fine.

I already tried different api Versions, different Browsers, etc.

The App is currently in sandbox mode. Off Course i tried Sharing with logged in to my Facebook Developer Account.

3

Answers


  1. If got the same issue …
    after checking all api versions, it only doesn’t work with the newest version 2.9.

    It looks like there is a bug in the new API version as the documentation still says it would work.

    Login or Signup to reply.
  2. I got the same problem but it only occurs with the newest version of graph API and It is working fine for v2.8 and lower version until July 17, 2017 as it is deprecated https://developers.facebook.com/docs/sharing/reference/feed-dialog

    Login or Signup to reply.
  3. ****As of April 18, 2017, the following parameters are no longer supported by Graph API versions 2.9 and higher. For versions 2.8 and lower, the parameters will continue working until July 17, 2017.**

    Picture, Name, Caption, Description**

    Use 2.8 and lower version for 2 months 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search