Files
DefinitelyTyped/fbsdk/fbsdk-tests.ts

29 lines
556 B
TypeScript

/// <reference path="fbsdk.d.ts" />
window.fbAsyncInit = function() {
FB.init(
{
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
}
);
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/dialogs/'
},
function(response) {
console.log(response);
}
);
FB.api(
"/me",
"POST",
function (fbResponse){
console.log(fbResponse);
}
);
};