September 2016
Beginner to intermediate
531 pages
12h 55m
English
It is perfectly possible to manually perform OAuth to authenticate and authorize your visualization with Facebook. However, Facebook has been kind enough to provide a very usable JavaScript SDK. The API abstracts away the process of logging into a function call. To make use of the API, we first need to include it in our visualization. To do this, simply include the following script inside one of your script tags:
(function(d){
var js;
var id = 'facebook-jssdk';
var ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));This code will create a new script ...
Read now
Unlock full access