7

I followed the instructions on this page: https://developers.facebook.com/docs/plugins/share-button/#settings

And i get a working share dialog, but when i try to share to "Share in a private message", i get the following error in the share dialog: "Attachment not found: The attachment could not be found."

My application is an angular 11 application, and i have this in my index.html, right after the body tag:

    <div id="fb-root"></div>
    <script>(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 = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

The button html looks like this:

<div *ngIf="fbShareRoute" class="fb-share-button" [attr.data-href]="fbShareRoute" data-layout="button" data-size="large"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.free-sudoku-puzzle.net%2F&amp;src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a></div>

My initial thought was that the fb script is not playing along nicely with angular, by the fact that i am binding the url via [attr.data-href], but i dont think this is the case:

  • the dialog works ok when simply sharing to your profile
  • i tried removing [attr.data-href] and just using a hardcoded data-href attribute, and this made no difference.

Any ideas?

zuku
  • 649
  • 8
  • 24
Davy
  • 6,295
  • 5
  • 27
  • 38

2 Answers2

4

Same here.

I think it's FB bug (OR they purposely disabled attachment/link sharing for certain accounts).

There was a major outage recently in FB messenger as well: https://developers.facebook.com/status/dashboard/

Alex P.
  • 56
  • 1
  • 1
    jikes! ok, lets wait and see if it is resolved in the coming days – Davy Dec 10 '20 at 06:40
  • 2
    I'm seeing the same bug. I thought it was on my end but then tested on a mainstream news site and got the same error there, too. – stereoscott Dec 11 '20 at 21:25
  • Same error here, this was working without changes, and now it doesn't work, I'm using the old SDK, my first Idea was that maybe this could be the cause, but here I can see that with the new SDK also it is wrong. – kintaro Dec 24 '20 at 16:51
  • same error in 2022 – János Aug 10 '22 at 13:16
3

This is a new bug/development. I had share buttons sharing to FB PM's perfectly fine until about the same time as you posted this.

Beeblbrox
  • 351
  • 1
  • 11