Skip to content

Commit 6f14bce

Browse files
authored
feat(facebook): plugin updates (#3721)
1 parent 29bd694 commit 6f14bce

File tree

1 file changed

+45
-12
lines changed
  • src/@ionic-native/plugins/facebook

1 file changed

+45
-12
lines changed

src/@ionic-native/plugins/facebook/index.ts

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ export interface FacebookLoginResponse {
55
status: string;
66

77
authResponse: {
8-
session_key: boolean;
9-
108
accessToken: string;
119

12-
expiresIn: number;
13-
14-
sig: string;
10+
data_access_expiration_time: string;
1511

16-
secret: string;
12+
expiresIn: number;
1713

1814
userID: string;
1915
};
@@ -152,18 +148,56 @@ export class Facebook extends IonicNativePlugin {
152148
EVENT_PARAM_VALUE_NO: '0',
153149
};
154150

151+
/**
152+
* Get the current application ID
153+
*
154+
* @returns {Promise<string>} Returns a Promise that resolves with the current application ID
155+
*/
156+
@Cordova()
157+
getApplicationId(): Promise<string> {
158+
return;
159+
}
160+
161+
/**
162+
* Set the application ID
163+
*
164+
* @param {string} id application ID
165+
*/
166+
@Cordova()
167+
setApplicationId(id: string): Promise<void> {
168+
return;
169+
}
170+
171+
/**
172+
* Get the current application name
173+
*
174+
* @returns {Promise<string>} Returns a Promise that resolves with the current application name
175+
*/
176+
@Cordova()
177+
getApplicationName(): Promise<string> {
178+
return;
179+
}
180+
181+
/**
182+
* Set the application name
183+
*
184+
* @param {string} name application name
185+
*/
186+
@Cordova()
187+
setApplicationName(name: string): Promise<void> {
188+
return;
189+
}
190+
155191
/**
156192
* Login to Facebook to authenticate this app.
157193
*
158194
* ```typescript
159195
* {
160196
* status: 'connected',
161197
* authResponse: {
162-
* session_key: true,
163198
* accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
199+
* data_access_expiration_time: '1623680244',
164200
* expiresIn: 5183979,
165-
* sig: '...',
166-
* secret: '...',
167201
* userID: '634565435'
168202
* }
169203
* }
@@ -257,9 +291,8 @@ export class Facebook extends IonicNativePlugin {
257291
* authResponse: {
258292
* userID: '12345678912345',
259293
* accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
260-
* session_Key: true,
261-
* expiresIn: '5183738',
262-
* sig: '...'
294+
* data_access_expiration_time: '1623680244',
295+
* expiresIn: '5183738'
263296
* },
264297
* status: 'connected'
265298
* }

0 commit comments

Comments
 (0)