在iframe中使用facebook messenger-checkbox的CSP问题

时间:2018-01-28 07:45:12

标签: facebook facebook-javascript-sdk facebook-messenger

我希望我的用户能够通过iframe将Facebook checkbox plugin添加到他们的网站。

我的应用程序提供iframe并托管页面:

<iframe src="https://www.botletter.com/cif/GWoe6LUboG9YBrdudAA2naV5" style="border:none;width:100%;"></iframe>

然后人们将这个iframe添加到他们的网站上。我将他们网站的域名列入白名单,并将他们的域名作为来源:

<div class="fb-messenger-checkbox"
  origin="<%= @checkbox.website %>"
  page_id="<%= @core_bot.page_id %>"
  messenger_app_id="MY APP ID"
  user_ref="<%= @random_user_ref %>"
  prechecked="false"
  allow_login="true"
  size="<%= @checkbox.button_size %>"></div>

不幸的是,它没有渲染,我收到以下错误:

  

拒绝展示   &#39; https://www.facebook.com/v2.6/plugins/messenger_checkbox.php?allow_login=true&app_id=534768046912528&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2FlY4eZXm_YWu.js%3Fversion%3D42%23cb%3Df2218eaf474e464%26domain%3Dwww.botletter.com%26origin%3Dhttps%253A%252F%252Fwww.botletter.com%252Ff1ea0c055b4547%26relation%3Dparent.parent&container_width=689&locale=en_US&messenger_app_id=534768046912528&origin=https%3A%2F%2Fwww.lalanguefrancaise.com%2F&page_id=1115924038427162&prechecked=true&sdk=joey&size=small&user_ref=437aa962df71ec4eea67&#39;   在一个框架中,因为祖先违反了以下内容安全性   政策指令:&#34;框架 - 祖先https://www.lalanguefrancaise.com&#34;。

以下错误可以复制on this page

也许这是因为我在iframe中复制了我在其他网站中集成的复选框?你知道我怎么能做这个工作吗?

0 个答案:

没有答案
相关问题