Socket
Socket
Sign inDemoInstall

cordova-plugin-facebook-connect

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.1.0

18

CHANGELOG.md

@@ -0,1 +1,19 @@

<a name="3.1.0"></a>
# [3.1.0](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/releases/tag/v3.1.0) (2021-08-31)
## Features
* Updated the `showDialog` method to allow for sharing photos (closes [#54](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/54))
* Added new `setDataProcessingOptions` method to allow for setting Data Processing Options as part of compliance with the California Consumer Privacy Act (CCPA) (closes [#57](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/57))
* Added new `setUserData` and `clearUserData` methods to enable the use of Advanced Matching (closes [#56](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/56))
## Bug Fixes
* Fixed an issue that could break the Cordova resume event on Android, which in turn could cause problems with elements like `<input type="file" />` (closes [#68](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/68))
* Fixed an issue that would cause Facebook dialogs to open in a webview on Android (closes [#81](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/81))
## Documentation
* Updated README to document the `getDeferredApplink` method, and the process necessary to use it on iOS (closes [#42](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues/42))
<a name="3.0.0"></a>

@@ -2,0 +20,0 @@ # [3.0.0](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/releases/tag/v3.0.0) (2021-08-17)

5

docs/browser/README.md

@@ -29,5 +29,6 @@ # Facebook Requirements and Set-Up [Web App]

## Change Facebook JavaScript SDK version (defaults to v9.0)
## Change Facebook JavaScript SDK version
```sh
$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_BROWSER_SDK_VERSION="v8.0"
$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_BROWSER_SDK_VERSION="v11.0"
```

@@ -34,0 +35,0 @@

@@ -13,3 +13,2 @@ # Troubleshooting

- [**General**](#general)
- [How do I Build without Eclipse?](#how-do-i-build-without-eclipse)
- [How do I Add a Like Button?](#how-do-i-add-a-like-button)

@@ -31,7 +30,2 @@ - [Where is the init API?](#where-is-the-init-api)

## General
### How do I Build without Eclipse?
- Solution
- Check the [Android Guide](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/blob/master/docs/android/README.md)
### How do I Add a Like Button?

@@ -110,15 +104,2 @@

### Jar mismatch! Fix your dependencies
- Problem
- I get this error:
```
BUILD FAILED
/usr/local/opt/android-sdk/tools/ant/build.xml:577: Jar mismatch! Fix your dependencies
```
- Solution
- You may have duplicate android-support-v4.jar files. Remove android-support-v4.jar from the `/libs` folder of your project.
### Open Fullscreen Dialog in Landscape Orientation

@@ -125,0 +106,0 @@ - Problem:

2

package.json
{
"name": "cordova-plugin-facebook-connect",
"version": "3.0.0",
"version": "3.1.0",
"description": "Cordova Facebook SDK Plugin",

@@ -5,0 +5,0 @@ "cordova": {

@@ -242,2 +242,32 @@ # cordova-plugin-facebook-connect

Share Photo Dialog:
{
method: "share",
photo_image: "/9j/4TIERXhpZgAATU0AKgAAAA..."
}
*photo_image* must be a Base64-encoded string, such as a value returned by [cordova-plugin-camera](https://www.npmjs.com/package/cordova-plugin-camera) or [cordova-plugin-file](https://www.npmjs.com/package/cordova-plugin-file). Note that you must provide only the Base64 data, so if you have a data URL returned by something like `FileReader` that looks like "data:image/jpeg;base64,/9j/4TIERXhpZgAATU0AKgAAAA...", you should split on ";base64,", e.g. `myDataUrl.split(';base64,')[1]`.
Here's a basic example using the camera plugin:
```js
navigator.camera.getPicture(function(dataUrl) {
facebookConnectPlugin.showDialog({
method: 'share',
photo_image: dataUrl
}, function() {
console.log('share success');
}, function(e) {
console.log('share error', e);
});
}, function(e) {
console.log('camera error', e);
}, {
quality: 100,
sourceType: Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.DATA_URL
});
```
Game request:

@@ -266,2 +296,3 @@

Success function returns an Object or `from` and `to` information when doing `apprequest`.
Failure function returns an error String.

@@ -323,2 +354,73 @@

#### Data Processing Options
This plugin allows developers to set Data Processing Options as part of compliance with the California Consumer Privacy Act (CCPA).
`setDataProcessingOptions(Array strings of options, String country, String state, Function success, Function failure)`
To explicitly not enable Limited Data Use (LDU) mode, use:
```js
facebookConnectPlugin.setDataProcessingOptions([], null, null, function() {
console.log('setDataProcessingOptions success');
}, function() {
console.error('setDataProcessingOptions failure');
});
```
To enable LDU with geolocation, use:
```js
facebookConnectPlugin.setDataProcessingOptions(["LDU"], 0, 0, function() {
console.log('setDataProcessingOptions success');
}, function() {
console.error('setDataProcessingOptions failure');
});
```
To enable LDU for users and specify user geography, use:
```js
facebookConnectPlugin.setDataProcessingOptions(["LDU"], 1, 1000, function() {
console.log('setDataProcessingOptions success');
}, function() {
console.error('setDataProcessingOptions failure');
});
```
For more information see: [Facebook Documentation](https://developers.facebook.com/docs/app-events/guides/ccpa)
#### Advanced Matching
With [Advanced Matching](https://developers.facebook.com/docs/app-events/advanced-matching/), Facebook can match conversion events to your customers to optimize your ads and build larger re-marketing audiences.
`setUserData(Object userData, Function success, Function failure)`
- **userData**, an object containing the user data to use for matching
Example user data object:
{
"em": "jsmith@example.com", //email
"fn": "john", //first name
"ln": "smith", //last name
"ph", "16505554444", //phone number
"db": "19910526", //birthdate
"ge": "f", //gender
"ct": "menlopark", //city
"st": "ca", //state
"zp": "94025", //zip code
"cn": "us" //country
}
Success function indicates the user data has been set.
Failure function returns an error String.
`clearUserData(Function success, Function failure)`
Success function indicates the user data has been cleared.
Failure function returns an error String.
### Login

@@ -410,3 +512,3 @@

This Plugin supports Facebook's [GDPR Compliance](https://developers.facebook.com/docs/app-events/gdpr-compliance/) **Delaying Automatic Event Collection**.
This plugin supports Facebook's [GDPR Compliance](https://developers.facebook.com/docs/app-events/gdpr-compliance/) **Delaying Automatic Event Collection**.

@@ -461,2 +563,23 @@ In order to enable this feature in your Cordova app, please set the *FACEBOOK_AUTO_LOG_APP_EVENTS* variable to "false" (default is true).

## App Ads and Deep Links
`getDeferredApplink(Function success, Function failure)`
Success function returns the deep link if one is defined.
Failure function returns an error String.
Note that on iOS, you must use a plugin such as [cordova-plugin-idfa](https://www.npmjs.com/package/cordova-plugin-idfa) to first request tracking permission from the user, then call the `setAdvertiserTrackingEnabled` method to enable advertiser tracking. Attempting to call `getDeferredApplink` without doing so will result in an empty string being returned.
```js
cordova.plugins.idfa.requestPermission().then(function() {
facebookConnectPlugin.setAdvertiserTrackingEnabled(true);
facebookConnectPlugin.getDeferredApplink(function(url) {
console.log('url = ' + url);
});
});
```
See the [Facebook Developer documentation](https://developers.facebook.com/docs/app-ads/deep-linking/) for more details.
## URL Suffixes for Multiple Apps

@@ -463,0 +586,0 @@

@@ -68,2 +68,18 @@ var exec = require('cordova/exec')

exports.setDataProcessingOptions = function (options, country, state, s, f) {
if (!(country >= 0 && state >= 0)) {
exec(s, f, 'FacebookConnectPlugin', 'setDataProcessingOptions', [options]);
} else {
exec(s, f, 'FacebookConnectPlugin', 'setDataProcessingOptions', [options, country, state]);
}
}
exports.setUserData = function (userData, s, f) {
exec(s, f, 'FacebookConnectPlugin', 'setUserData', [userData])
}
exports.clearUserData = function (s, f) {
exec(s, f, 'FacebookConnectPlugin', 'clearUserData', [])
}
exports.logEvent = function (name, params, valueToSum, s, f) {

@@ -70,0 +86,0 @@ // Prevent NSNulls getting into iOS, messes up our [command.argument count]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc