From 950aefe678e62d92bfdb12641b6ac73d8cdb1030 Mon Sep 17 00:00:00 2001 From: Amrit Kahlon Date: Wed, 17 Feb 2016 11:10:46 -0800 Subject: [PATCH] Fixed naming conventions --- facebook-js-sdk/facebook-js-sdk-tests.ts | 8 ++++---- facebook-js-sdk/facebook-js-sdk.d.ts | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/facebook-js-sdk/facebook-js-sdk-tests.ts b/facebook-js-sdk/facebook-js-sdk-tests.ts index b13c4df1e4..49e615f529 100644 --- a/facebook-js-sdk/facebook-js-sdk-tests.ts +++ b/facebook-js-sdk/facebook-js-sdk-tests.ts @@ -8,19 +8,19 @@ FB.init({ xfbml: true }); -FB.getLoginStatus(function(response: fb.ILoginStatusResp) { +FB.getLoginStatus(function(response: fb.AuthResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); }); -FB.getAuthResponse(function(response: fb.ILoginStatusResp) { +FB.getAuthResponse(function(response: fb.AuthResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); }); -FB.login(function(response: fb.ILoginStatusResp) { +FB.login(function(response: fb.AuthResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); @@ -28,7 +28,7 @@ FB.login(function(response: fb.ILoginStatusResp) { scope: 'public_profile' }); -FB.logout(function(response: fb.ILoginStatusResp) { +FB.logout(function(response: fb.AuthResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); diff --git a/facebook-js-sdk/facebook-js-sdk.d.ts b/facebook-js-sdk/facebook-js-sdk.d.ts index 1b6fb6111e..e4243283f8 100644 --- a/facebook-js-sdk/facebook-js-sdk.d.ts +++ b/facebook-js-sdk/facebook-js-sdk.d.ts @@ -4,10 +4,10 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import fb = facebook; -declare var FB: fb.IFacebookStatic; +declare var FB: fb.FacebookStatic; declare module facebook { - interface IFacebookStatic { + interface FacebookStatic { // api: any; // AppEvents: any; // Canvas: any; @@ -18,20 +18,20 @@ declare module facebook { * * @param callback function to handle the response. */ - getAuthResponse(callback: (response: ILoginStatusResp) => void): void; + getAuthResponse(callback: (response: AuthResponse) => void): void; /** * FB.getLoginStatus() allows you to determine if a user is * logged in to Facebook and has authenticated your app. * * @param callback function to handle the response. */ - getLoginStatus(callback: (response: ILoginStatusResp) => void): void; + getLoginStatus(callback: (response: AuthResponse) => void): void; /** * The method FB.init() is used to initialize and setup the SDK. * * @param params params for the initialization. */ - init(params: IInitParams): void; + init(params: InitParams): void; /** * Use this function to log the user in * @@ -42,18 +42,18 @@ declare module facebook { * @param callback function to handle the response. * @param options optional ILoginOption to add params such as scope. */ - login(callback: (response: ILoginStatusResp) => void, options?: ILoginOptions): void; + login(callback: (response: AuthResponse) => void, 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 */ - logout(callback: (response: ILoginStatusResp) => void): void; + logout(callback: (response: AuthResponse) => void): void; // ui: any; // XFBML: any; } - interface IInitParams { + interface InitParams { appId: string; version?: string; cookie?: boolean; @@ -63,7 +63,7 @@ declare module facebook { hideFlashCallback?: boolean; } - interface ILoginOptions { + interface LoginOptions { auth_type?: string; scope?: string; return_scopes?: boolean; @@ -78,7 +78,7 @@ declare module facebook { // //////////////////////// - interface ILoginStatusResp { + interface AuthResponse { status: string; authResponse: { accessToken: string;