I am trying to display a like and a share button in side my chrome extension's popup.html
. So, I have added the sdk code in facebook-2.4.js
and loaded it in the head
tag of popup.html
. I tried to test Facebook Integration by putting this code in the body
of my popup.html
:
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>
But, I got this error in chrome console:
Failed to load resource: net::ERR_FAILED
chrome-extension://connect.facebook.net/en_US/sdk.js
Here's what I tried: In the manifest
I added https://connect.facebook.net/
as permission. I also tried with the http
version of the url. It didn't work.
What I'd rather consider though is just downloading the SDK once and have it loaded from disk. That way, you're isolating yourself from one source of failure and avoid potential slow downs in page loading.
If that's not possible for you for whatever reason, and tuning the host pattern isn't helping, I'd suggest to post a full example in order to ease debugging and reproducibility for others on the list trying to help you.