Channel URL Facebook

假如想象 提交于 2019-12-22 18:46:55

问题


I'm implementing the facebook login in my website wich is in the form of mysite.anotherdomain.org . I did all explained in the Documentation of the Javascript SDK but, since I have some problems, I'm wondering if the error comes from the channel url.

What should I exactly write for the channel file?

Thanks in advance!


回答1:


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.
  • All you need inside the file is

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

    You can find out more from https://developers.facebook.com/docs/reference/javascript/#channel



    来源:https://stackoverflow.com/questions/15821196/channel-url-facebook

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