Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we need to create a channel.html on our server to use Facebook JS SDK?

I really don't understand why do we need to create channel.html file, as mentioned by FB docs. I also want to understand how it is used. In my logs I don't see this file being ever requested.

like image 975
AppleGrew Avatar asked Aug 13 '11 19:08

AppleGrew


People also ask

What is Facebook JavaScript SDK?

The Facebook SDK for JavaScript provides a rich set of client-side functionality that: Enables you to use the Like Button and other Social Plugins on your site. Enables you to use Facebook Login to lower the barrier for people to sign up on your site. Makes it easy to call into Facebook's Graph API.

How to enable JavaScript SDK for Facebook Login?

Enable JavaScript SDK for Facebook LoginSelect Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.

What is a JavaScript SDK?

SDK stands for "software development kit," which in a JavaScript context often means a library for interacting with a specific REST API.

What is https connect facebook net?

Facebook Connect is a single sign-on application which allows users to interact on other websites through their Facebook account. Launched in December 2008, Facebook Connect works with over 15,000 "partnered" sites to make site access easier for its users.


1 Answers

The channel file is to provide a way to do cross domain communication between FB's servers and your own. The reason for this is their tight control over access tokens. You must authenticate a redirect url and app id to retrieve this access token. In order for them to pass you the token, they hit your URL with the access token in the hash. With the Channel URL, they get to pass this token to themselves (their JavaScript running on your domain).

This channel file can then communicate the access token to your active page.

For them to keep all of these things available to only their domain, they need something that works in every browser. Currently, that is a hack of creating popups that are not accessible by javascript running on your server.

like image 65
Drew Avatar answered Oct 06 '22 00:10

Drew