Skip to content

Commit

Permalink
feat(facebook): add FacebookLoginResponse interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Jul 20, 2016
1 parent 979838f commit 8b27bed
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/plugins/facebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export class Facebook {
* ```
*
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) this app has upon logging in.
* @return Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
* @return {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
*/
@Cordova()
static login(permissions: string[]): Promise<any> { return; }
static login(permissions: string[]): Promise<FacebookLoginResponse> { return; }

/**
* Logout of Facebook.
Expand Down Expand Up @@ -246,3 +246,14 @@ export class Facebook {
picture: string
}): Promise<any> { return; }
}
export interface FacebookLoginResponse {
status: string;
authResponse: {
session_key: boolean;
accessToken: string;
expiresIn: number;
sig: string;
secret: string;
userID: string;
};
}

0 comments on commit 8b27bed

Please sign in to comment.