Channel URL Facebook

11,403

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

    Share:
    11,403
    Federico Capello
    Author by

    Federico Capello

    Updated on June 14, 2022

    Comments

    • Federico Capello
      Federico Capello almost 2 years

      I'm implementing the Facebook login in my website which 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?

    • ScottB
      ScottB over 10 years
      This fixed it for me as well, though I also had to change IE to enable protected mode: IE -> Internet Options -> Security tab -> Local intranet -> (check) Enable protected mode. (assuming your site is in the local intranet)