From 6f14bce6ce2f27ebbe483c5578d0bfb46abad2e0 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Fri, 20 Aug 2021 14:52:22 -0400 Subject: [PATCH] feat(facebook): plugin updates (#3721) --- src/@ionic-native/plugins/facebook/index.ts | 57 ++++++++++++++++----- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/src/@ionic-native/plugins/facebook/index.ts b/src/@ionic-native/plugins/facebook/index.ts index 788284eb..96d3501a 100644 --- a/src/@ionic-native/plugins/facebook/index.ts +++ b/src/@ionic-native/plugins/facebook/index.ts @@ -5,16 +5,12 @@ export interface FacebookLoginResponse { status: string; authResponse: { - session_key: boolean; - accessToken: string; + data_access_expiration_time: string; + expiresIn: number; - sig: string; - - secret: string; - userID: string; }; } @@ -152,6 +148,46 @@ export class Facebook extends IonicNativePlugin { EVENT_PARAM_VALUE_NO: '0', }; + /** + * Get the current application ID + * + * @returns {Promise} Returns a Promise that resolves with the current application ID + */ + @Cordova() + getApplicationId(): Promise { + return; + } + + /** + * Set the application ID + * + * @param {string} id application ID + */ + @Cordova() + setApplicationId(id: string): Promise { + return; + } + + /** + * Get the current application name + * + * @returns {Promise} Returns a Promise that resolves with the current application name + */ + @Cordova() + getApplicationName(): Promise { + return; + } + + /** + * Set the application name + * + * @param {string} name application name + */ + @Cordova() + setApplicationName(name: string): Promise { + return; + } + /** * Login to Facebook to authenticate this app. * @@ -159,11 +195,9 @@ export class Facebook extends IonicNativePlugin { * { * status: 'connected', * authResponse: { - * session_key: true, * accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn', + * data_access_expiration_time: '1623680244', * expiresIn: 5183979, - * sig: '...', - * secret: '...', * userID: '634565435' * } * } @@ -257,9 +291,8 @@ export class Facebook extends IonicNativePlugin { * authResponse: { * userID: '12345678912345', * accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn', - * session_Key: true, - * expiresIn: '5183738', - * sig: '...' + * data_access_expiration_time: '1623680244', + * expiresIn: '5183738' * }, * status: 'connected' * }