typescript-closure-tools
Version:
Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files
33 lines (23 loc) • 557 B
text/typescript
/// <reference path="hellojs.d.ts" />
hello.init(
{
'facebook': '<app key>',
},
{
redirect_uri: 'hello.html',
display: 'page',
}
);
hello('facebook').login();
hello('facebook').logout();
hello.on('auth.login', auth => {
alert('log to ' + auth.network)
}).on('auth.logout', auth => {
alert('unlog from ' + auth.network)
});
hello.getAuthResponse('facebook');
hello.login('facebook', null, () => {
var req = hello.getAuthResponse('facebook');
});
hello.logout('facebook');
var serviceInfo = hello.service('facebook');