Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(facebook): plugin updates #3721

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions src/@ionic-native/plugins/facebook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ export interface FacebookLoginResponse {
status: string;

authResponse: {
session_key: boolean;

accessToken: string;

expiresIn: number;

sig: string;
data_access_expiration_time: string;

secret: string;
expiresIn: number;

userID: string;
};
Expand Down Expand Up @@ -152,18 +148,56 @@ export class Facebook extends IonicNativePlugin {
EVENT_PARAM_VALUE_NO: '0',
};

/**
* Get the current application ID
*
* @returns {Promise<string>} Returns a Promise that resolves with the current application ID
*/
@Cordova()
getApplicationId(): Promise<string> {
return;
}

/**
* Set the application ID
*
* @param {string} id application ID
*/
@Cordova()
setApplicationId(id: string): Promise<void> {
return;
}

/**
* Get the current application name
*
* @returns {Promise<string>} Returns a Promise that resolves with the current application name
*/
@Cordova()
getApplicationName(): Promise<string> {
return;
}

/**
* Set the application name
*
* @param {string} name application name
*/
@Cordova()
setApplicationName(name: string): Promise<void> {
return;
}

/**
* Login to Facebook to authenticate this app.
*
* ```typescript
* {
* status: 'connected',
* authResponse: {
* session_key: true,
* accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
* data_access_expiration_time: '1623680244',
* expiresIn: 5183979,
* sig: '...',
* secret: '...',
* userID: '634565435'
* }
* }
Expand Down Expand Up @@ -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'
* }
Expand Down