mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
feat(facebook): add FacebookLoginResponse interface
This commit is contained in:
parent
979838f4b7
commit
8b27bed4df
@ -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.
|
||||
@ -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;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user