“Failed to load resource” using Facebook's example code

 ̄綄美尐妖づ 提交于 2019-11-28 08:08:59

There were a couple things wrong here:

  1. needed to change js.src assignment to: js.src="https://connect.facebook.net/en_US/all.js";

  2. Facebook no longer supports JS SDK calls made from a local file, the script has to be run on a file with an http:// or https:// URI, as per this bug report on Facebook. I will need to upload the file to a web server, change the canvas URL accordingly, and retest.

just disable adblock, it works for me

First you need to append http or https to js.src url

Second you need to host you html file on a server.

Go To Facebook developer and add your website domain and get the id and paste below:

 appId : 'my app ID', // App ID from the App Dashboard

If your URL contains words such as "advert", "ad", "doubleclick", "click", or something similar…

For example:

  • GET googleads.g.doubleclick.net/pagead/id
  • static.doubleclick.net/instream/ad_status.js

…Then ad-blocker will block it.

Ref : Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!