mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #32045 from fluidsonic/facebook-js-sdk-3.2
[facebook-js-sdk] Updated types to SDK version 3.2 & fixed FB.login()
This commit is contained in:
@@ -22,6 +22,14 @@ FB.getLoginStatus(function(response: fb.StatusResponse) {
|
||||
const authResponse: fb.AuthResponse = FB.getAuthResponse();
|
||||
console.log(authResponse.accessToken);
|
||||
|
||||
FB.login();
|
||||
|
||||
FB.login(function(response: fb.StatusResponse) {
|
||||
console.log(response);
|
||||
console.log(response.status);
|
||||
console.log(response.authResponse.accessToken);
|
||||
});
|
||||
|
||||
FB.login(function(response: fb.StatusResponse) {
|
||||
console.log(response);
|
||||
console.log(response.status);
|
||||
|
||||
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
||||
// Type definitions for the Facebook Javascript SDK 3.1
|
||||
// Type definitions for the Facebook Javascript SDK 3.2
|
||||
// Project: https://developers.facebook.com/docs/javascript
|
||||
// Definitions by: Amrit Kahlon <https://github.com/amritk>
|
||||
// Mahmoud Zohdi <https://github.com/mahmoudzohdi>
|
||||
@@ -50,7 +50,7 @@ declare namespace facebook {
|
||||
* @param callback function to handle the response.
|
||||
* @param options optional ILoginOption to add params such as scope.
|
||||
*/
|
||||
login(callback: (response: StatusResponse) => void, options: LoginOptions): void;
|
||||
login(callback: (response: StatusResponse) => void, options?: LoginOptions): void;
|
||||
|
||||
/**
|
||||
* Use this function to log the user in
|
||||
@@ -61,12 +61,12 @@ declare namespace facebook {
|
||||
*
|
||||
* @param options optional ILoginOption to add params such as scope.
|
||||
*/
|
||||
login(options: LoginOptions): void;
|
||||
login(options?: LoginOptions): void;
|
||||
|
||||
/**
|
||||
* The method FB.logout() logs the user out of your site and, in some cases, Facebook.
|
||||
*
|
||||
* @param callback function to handle the response
|
||||
* @param callback optional function to handle the response
|
||||
*/
|
||||
logout(callback?: (response: StatusResponse) => void): void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user