Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook share button issue: "Attachment not found: The attachment could not be found."

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?

like image 710
Davy Avatar asked Dec 06 '20 09:12

Davy


People also ask

Why am I getting the Facebook attachment unavailable error?

Many people are complaining that they are getting the Facebook attachment unavailable error, with this error message followed by it – This attachment may have been removed or the person who shared it may not have permission to share it with you. Receiving this attachment unavailable error? How to fix Facebook Attachment Unavailable?

What does it mean when an attachment is unavailable?

This attachment may have been removed or the person who shared it may not have permission to share it with you. Receiving this attachment unavailable error? How to fix Facebook Attachment Unavailable?

Why does it say attachment unavailable on Instagram?

If someone else’s posts are unavailable If you are getting the ‘Attachment unavailable’ on someone else’s post, ask them to change the privacy of their post. Or if you are unable to contact them, it could also be possible that the original poster might have deleted the attachment.

Why is my link on Facebook not showing the picture?

There are times when you share the link on Facebook and thumbnail image doesn't show up or it does appear, but it is not the picture you've expected to be shown. In order to fix these steps should be taken: 1. Verify if there are OG tags on your website.


2 Answers

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/

like image 65
Alex P. Avatar answered Oct 01 '22 19:10

Alex P.


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.

like image 43
Beeblbrox Avatar answered Oct 01 '22 18:10

Beeblbrox