Skip to content

Commit e4b1719

Browse files
authored
feat(facebook): update api and logPurchase methods to include additional arguments(#3607)
1 parent 4a796ca commit e4b1719

File tree

1 file changed

+4
-2
lines changed
  • src/@ionic-native/plugins/facebook

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,11 @@ export class Facebook extends IonicNativePlugin {
263263
*
264264
* @param {string} requestPath Graph API endpoint you want to call
265265
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) for this request.
266+
* @param {string} httpMethod HTTP method for the request, one of "GET", "POST", or "DELETE" (default is "GET")
266267
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
267268
*/
268269
@Cordova()
269-
api(requestPath: string, permissions: string[]): Promise<any> {
270+
api(requestPath: string, permissions: string[], httpMethod?: string): Promise<any> {
270271
return;
271272
}
272273

@@ -291,10 +292,11 @@ export class Facebook extends IonicNativePlugin {
291292
*
292293
* @param {number} value Value of the purchase.
293294
* @param {string} currency The currency, as an [ISO 4217 currency code](http://en.wikipedia.org/wiki/ISO_4217)
295+
* @param {Object} params An object containing extra data to log with the event
294296
* @returns {Promise<any>}
295297
*/
296298
@Cordova()
297-
logPurchase(value: number, currency: string): Promise<any> {
299+
logPurchase(value: number, currency: string, params?: Object): Promise<any> {
298300
return;
299301
}
300302

0 commit comments

Comments
 (0)