且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

频道网址Facebook

更新时间:2023-11-27 13:50:40

频道文件基本上修复了某些浏览器的某些跨域问题。以下是Facebook已经确定的三个:

  • 包含跨框架通信代码的页面可能会导致社交插件在没有channelUrl的情况下显示为空白。

  • 如果没有提供channelUrl并且页面包含自动播放音频或视频,则用户可能会听到两个音频流,因为该页面已在后台第二次加载以进行跨域通信。

  • 一个通道文件将阻止在服务器端日志中包含额外的命中。如果您未指定channelUrl,则应从日志中删除包含fb_xd_bust或fb_xd_fragment参数的页面视图,以确保正确计数。

  • The channel file basically fixes certain cross-domain issues for certain browsers. The following are the three that Facebook has identified:

  • Pages that include code to communicate across frames may cause Social Plugins to show up as blank without a channelUrl.
  • if no channelUrl is provided and a page includes auto-playing audio or video, the user may hear two streams of audio because the page has been loaded a second time in the background for cross domain communication.
  • a channel file will prevent inclusion of extra hits in your server-side logs. If you do not specify a channelUrl, you should remove page views containing fb_xd_bust or fb_xd_fragment parameters from your logs to ensure proper counts.
  • 全部你需要在文件里面

    <script src="//connect.facebook.net/en_US/all.js"></script>
    

    您可以从 https://developers.facebook.com/docs/reference/javascript/#channel