mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-28 05:50:21 +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.
|
* @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()
|
@Cordova()
|
||||||
static login(permissions: string[]): Promise<any> { return; }
|
static login(permissions: string[]): Promise<FacebookLoginResponse> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout of Facebook.
|
* Logout of Facebook.
|
||||||
@ -246,3 +246,14 @@ export class Facebook {
|
|||||||
picture: string
|
picture: string
|
||||||
}): Promise<any> { return; }
|
}): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
export interface FacebookLoginResponse {
|
||||||
|
status: string;
|
||||||
|
authResponse: {
|
||||||
|
session_key: boolean;
|
||||||
|
accessToken: string;
|
||||||
|
expiresIn: number;
|
||||||
|
sig: string;
|
||||||
|
secret: string;
|
||||||
|
userID: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user