2

I have problem with Facebook ui share dialog (visit https://developers.facebook.com/docs/sharing/reference/share-dialog).

I'm using this code for share a page (where is setting the correct og metatags) with this Javascript Code:

FB.ui({
        method: 'share',
        href: '{{ user_share_path }}'
        }, function(response){
                 if (response && !response.error_code) {
                        alert('Thank you');
                 } else {
                     alert('Ops! Something goes wrong');
                 }
             });

When the user shares link with the Javascript Facebook code the result in user wall is a very poor content element with just the title. If the user copy manually the link "user_share_path" to their wall everything is fine and every og metatag in the page is showed in post. I've also tried to use share_open_graph method but I had the same effects.

Here there is a screenshot with the two post, once with JS the other manually posted:

Link shared first time with Facebook ui.share dialog, second time manually from my facebook diary

Any idea why? Thanks

mariselli
  • 101
  • 6
  • If you share that same link again, after it has been shared manually on Facebook – does it show the right data then? If so, this is simply an issue of Facebook not having cached your page’s meta data already when you call the Share dialog. – CBroe Sep 08 '14 at 10:51
  • Hi @CBroe , unfortunately is not a cache problem. I tried to clear cache with Facebook Debug Tool but nothing is changed. With deprecated code, FB.ui({method: 'feed',link: '{{ user_share_path }}'}, onResponse) I've got a good result but the design of the posted element is different from the element posted manually, it has a gray background. – mariselli Sep 08 '14 at 11:11
  • Can you give an actual URL, so we can look at it ourselves? – CBroe Sep 08 '14 at 11:53
  • This is the url I've tried to share: http://www.unifacile.it/subscription/user/d1d4 – mariselli Sep 08 '14 at 15:11
  • That looks fine to me, at least the preview the URL version of the Share dialog shows: https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.unifacile.it%2Fsubscription%2Fuser%2Fd1d4 – CBroe Sep 08 '14 at 15:12
  • This is the problem. Also to me if I share directly or with direct link is fine. But published with the Javascript is ugly. The weird thing is that in the home stream the post is showed with all info while in the user wall not. I'm getting crazy :( – mariselli Sep 08 '14 at 15:17

0 Answers0