From 4f0ba4af9445e8e452a79a18a37a2d3845dc7887 Mon Sep 17 00:00:00 2001 From: Maxim Belov Date: Wed, 7 Sep 2022 13:14:06 +0300 Subject: [PATCH] Set new plugin id --- .github/issue_template.md | 2 +- CHANGELOG.md | 14 ++++++++++++-- CONTRIBUTING.md | 4 ++-- README.md | 18 +++++++++--------- docs/TROUBLESHOOTING.md | 4 ++-- docs/android/README.md | 6 +++--- docs/browser/README.md | 4 ++-- docs/ios/README.md | 4 ++-- package.json | 8 ++++---- plugin.xml | 6 +++--- scripts/browser/after_prepare.js | 4 ++-- tests/plugin.xml | 6 +++--- 12 files changed, 45 insertions(+), 35 deletions(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index f16bfab44..b55bb8dc0 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -19,7 +19,7 @@ A clear and concise description of what you expected to happen A sample repo is needed for this issue to be fixed, please provide one in order to reproduce the problem. -You could for example try to use the [cordova-plugin-facebook-connect-lab](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect-lab) to reproduce your issue. +You could for example try to use the [cordova-plugin-fbsdk-lab](https://github.com/MaximBelov/cordova-plugin-fbsdk-lab) to reproduce your issue. **Plugin version, OS, devices, etc** diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b8a415ef..29a672ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ + +# [4.0.1](https://github.com/MaximBelov/cordova-plugin-fbsdk/releases/tag/v4.0.1) (2022-09-07) + +## Features + +* Updated the Facebook SDK to 14.1.1 for Android +* Updated the Facebook SDK to 14.1.0 for iOS +* Updated the Facebook JavaScript SDK used by the browser platform to v14.0 +* Update plugin id cordova-plugin-fbsdk + -# [4.0.0](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/releases/tag/v4.0.0) (TBD) +# [4.0.0](https://github.com/MaximBelov/cordova-plugin-facebook-connect/releases/tag/v4.0.0) (2022-09-06) ## Breaking Changes @@ -206,4 +216,4 @@ v1.0.0 is the initial release of the plugin, created as a fork of the now-deprec * Fixed an issue that previously caused a loop when logging into Facebook on iOS * Removed all references to Open Graph Stories, which were [deprecated by Facebook in 2019](https://developers.facebook.com/docs/sharing/opengraph) * Updated plugin.xml to only run after_prepare hook on the browser platform -* Updated browser after_prepare hook to get preferences including `APP_ID` and the new `FACEBOOK_BROWSER_SDK_VERSION` from package.json \ No newline at end of file +* Updated browser after_prepare hook to get preferences including `APP_ID` and the new `FACEBOOK_BROWSER_SDK_VERSION` from package.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdbc11ea2..cad3cf658 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ These are just guidelines, not rules, use your best judgement and feel free to p Before creating a Github issue make sure you... - Check the [Troubleshooting Guide](./docs/TROUBLESHOOTING.md) for well known issues. -- Search the [issues list](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues) for existing closed or still open issues +- Search the [issues list](https://github.com/MaximBelov/cordova-plugin-fbsdk/issues) for existing closed or still open issues - Create a Github issue #### Creating an Issue @@ -29,4 +29,4 @@ Can you solve the problem yourself? If so see the next section on Pull Requests - Include screenshots and animated GIFs in your pull request whenever possible. - Try to follow the [JavaScript](https://github.com/Wizcorp/javascript-styleguide/blob/master/README.md), [Objective-C](http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml) or [Java](https://google-styleguide.googlecode.com/svn/trunk/javaguide.html) style guides. Although these are just guides, please at least support continuety (that means **using 4 spaces please**). - **Send your pull request to the develop branch.** -- If you can, provide sample testing code. \ No newline at end of file +- If you can, provide sample testing code. diff --git a/README.md b/README.md index c9d32741b..69c0ffd4a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# cordova-plugin-facebook-connect +# cordova-plugin-fbsdk > Use Facebook SDK in Cordova projects @@ -13,12 +13,12 @@ ## Installation -See npm package for versions - https://www.npmjs.com/package/cordova-plugin-facebook-connect +See npm package for versions - https://www.npmjs.com/package/cordova-plugin-fbsdk Make sure you've registered your Facebook app with Facebook and have an `APP_ID` [https://developers.facebook.com/apps](https://developers.facebook.com/apps). ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" ``` As the `APP_NAME` is used as a string in XML files, if your app name contains any special characters like "&", make sure you escape them, e.g. "&". @@ -43,7 +43,7 @@ The Facebook plugin for [Apache Cordova](http://cordova.apache.org/) allows you ## Sample Repo -If you are looking to test the plugin, would like to reproduce a bug or build issues, there is a demo project for such purpose: [cordova-plugin-facebook-connect-lab](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect-lab). +If you are looking to test the plugin, would like to reproduce a bug or build issues, there is a demo project for such purpose: [cordova-plugin-fbsdk-lab](https://github.com/MaximBelov/cordova-plugin-fbsdk-lab). ## Compatibility @@ -91,7 +91,7 @@ Success function indicates the application name has been updated. Note that in order to dynamically switch between multiple app IDs on iOS, you must use the *OTHER_APP_SCHEMES* variable and specify each additional app ID you will use with `setApplicationId` separated by a comma, e.g. ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable OTHER_APP_SCHEMES="fb987654321,fb876543210,fb765432109" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable OTHER_APP_SCHEMES="fb987654321,fb876543210,fb765432109" ``` ### Get Client Token @@ -516,7 +516,7 @@ Starting from Facebook SDK v4.34 for both iOS and Android, there is a new way of In order to enable this feature in your Cordova app, please set the *FACEBOOK_HYBRID_APP_EVENTS* variable to "true" (default is false): ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_HYBRID_APP_EVENTS="true" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_HYBRID_APP_EVENTS="true" ``` Please check [this repo](https://github.com/msencer/fb_hybrid_app_events_sample) for an example app using this feature. @@ -528,7 +528,7 @@ This plugin supports Facebook's [GDPR Compliance](https://developers.facebook.co In order to enable this feature in your Cordova app, please set the *FACEBOOK_AUTO_LOG_APP_EVENTS* variable to "false" (default is true). ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_AUTO_LOG_APP_EVENTS="false" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_AUTO_LOG_APP_EVENTS="false" ``` Then, re-enable auto-logging after an end User provides consent by calling the `setAutoLogAppEventsEnabled` method and set it to true. @@ -546,7 +546,7 @@ facebookConnectPlugin.setAutoLogAppEventsEnabled(true, function() { To disable collection of `advertiser-id`, please set the *FACEBOOK_ADVERTISER_ID_COLLECTION* variable to "false" (default is true). ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_ADVERTISER_ID_COLLECTION="false" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_ADVERTISER_ID_COLLECTION="false" ``` Then, re-enable collection by calling the `setAdvertiserIDCollectionEnabled` method and set it to true. @@ -599,5 +599,5 @@ See the [Facebook Developer documentation](https://developers.facebook.com/docs/ When using the same Facebook app with multiple iOS apps, use the *FACEBOOK_URL_SCHEME_SUFFIX* variable to set a unique URL Suffix for each app. This ensures that Facebook redirects back to the correct app after closing the login window. ```bash -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_URL_SCHEME_SUFFIX="mysecondapp" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234" --variable FACEBOOK_URL_SCHEME_SUFFIX="mysecondapp" ``` diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 049ea3538..d38c1a3d4 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -1,6 +1,6 @@ # Troubleshooting -Can't solve your issue here? Check the [existing issues](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/issues) on Github. If you still cannot find a solution please [create and issue after reading the contributing guide](../CONTRIBUTING.md). +Can't solve your issue here? Check the [existing issues](https://github.com/MaximBelov/cordova-plugin-fbsdk/issues) on Github. If you still cannot find a solution please [create and issue after reading the contributing guide](../CONTRIBUTING.md). When creating a Github issue **remember to**: @@ -52,7 +52,7 @@ The better way to understand this little "workflow" is to manipulate the Graph A - I was using `FB.init()` and now it's not working. - Solution - - You are using an out-dated API. Please check the [new API with sample code](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect/blob/master/README.md) and sample projects in `platforms/ios` and `platforms/android`. + - You are using an out-dated API. Please check the [new API with sample code](https://github.com/MaximBelov/cordova-plugin-fbsdk/blob/master/README.md) and sample projects in `platforms/ios` and `platforms/android`. ## Android ### No Reply From Login? diff --git a/docs/android/README.md b/docs/android/README.md index b3ef31fbb..b0df2e609 100644 --- a/docs/android/README.md +++ b/docs/android/README.md @@ -16,7 +16,7 @@ $ cd myApp/ $ cordova platform add android # Remember to replace APP_ID and APP_NAME variables -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" ``` You can now use the plugin right away @@ -31,10 +31,10 @@ Of course if you could, you could update your Cordova CLI and avoid specifying e ### In case of conflict -If you would face version conflicts regarding the Facebook SDK with other plugins used in your project while installing `cordova-plugin-facebook-connect` for your ANDROID platform, you would be able to specify a specific Facebook SDK version for ANDROID using the variable `FACEBOOK_ANDROID_SDK_VERSION` +If you would face version conflicts regarding the Facebook SDK with other plugins used in your project while installing `cordova-plugin-fbsdk` for your ANDROID platform, you would be able to specify a specific Facebook SDK version for ANDROID using the variable `FACEBOOK_ANDROID_SDK_VERSION` ```sh -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_ANDROID_SDK_VERSION="X.YY.Z" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_ANDROID_SDK_VERSION="X.YY.Z" ``` where `X.YY.Z` could be for example 4.25.0. More information about the Facebook SDK for Android and list of their versions in the [Facebook documentation](https://developers.facebook.com/docs/android) diff --git a/docs/browser/README.md b/docs/browser/README.md index 34144aac2..c212becd0 100644 --- a/docs/browser/README.md +++ b/docs/browser/README.md @@ -23,13 +23,13 @@ $ cd myApp/ $ cordova platform add browser # Remember to replace APP_ID and APP_NAME variables -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" ``` ## 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="v11.0" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_BROWSER_SDK_VERSION="v14.0" ``` ## Setup diff --git a/docs/ios/README.md b/docs/ios/README.md index 3ce3cf0c7..1d0a8c00d 100644 --- a/docs/ios/README.md +++ b/docs/ios/README.md @@ -17,7 +17,7 @@ $ cd myApp/ $ cordova platform add ios # Remember to replace APP_ID and APP_NAME variables -$ cordova plugin add cordova-plugin-facebook-connect --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" +$ cordova plugin add cordova-plugin-fbsdk --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" ``` ### Cocoapods @@ -38,7 +38,7 @@ pod dependencies #### Error: pod: Command failed with exit code 31 -If you install the plugin and face the error `Failed to install 'cordova-plugin-facebook-connect': Error: pod: Command failed with exit code 31`, it probably means that your local Pod repo is not up-to-date. In order to solve the problem, prior the installation, run the following command in your platform to update your Pod repo: +If you install the plugin and face the error `Failed to install 'cordova-plugin-fbsdk': Error: pod: Command failed with exit code 31`, it probably means that your local Pod repo is not up-to-date. In order to solve the problem, prior the installation, run the following command in your platform to update your Pod repo: ```bash pod update diff --git a/package.json b/package.json index 5cc5bc022..6939ad8cb 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "cordova-plugin-facebook-connect", - "version": "4.0.0", + "name": "cordova-plugin-fbsdk", + "version": "4.0.1", "description": "Cordova Facebook SDK Plugin", "cordova": { - "id": "cordova-plugin-facebook-connect", + "id": "cordova-plugin-fbsdk", "platforms": [ "android", "ios", @@ -12,7 +12,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect" + "url": "https://github.com/MaximBelov/cordova-plugin-fbsdk" }, "keywords": [ "cordova", diff --git a/plugin.xml b/plugin.xml index 2e6566418..1c708f7af 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,8 +1,8 @@ + id="cordova-plugin-fbsdk" + version="4.0.1"> Facebook Connect @@ -13,7 +13,7 @@ Cordova application as you use in your web application. - https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect + https://github.com/MaximBelov/cordova-plugin-fbsdk Apache 2.0 diff --git a/scripts/browser/after_prepare.js b/scripts/browser/after_prepare.js index 5d3e0863d..bfab1d7e9 100755 --- a/scripts/browser/after_prepare.js +++ b/scripts/browser/after_prepare.js @@ -48,8 +48,8 @@ if(process.argv.join("|").indexOf("FACEBOOK_BROWSER_SDK_VERSION=") > -1) { } var files = [ - "platforms/browser/www/plugins/cordova-plugin-facebook-connect/www/facebook-browser.js", - "platforms/browser/platform_www/plugins/cordova-plugin-facebook-connect/www/facebook-browser.js", + "platforms/browser/www/plugins/cordova-plugin-fbsdk/www/facebook-browser.js", + "platforms/browser/platform_www/plugins/cordova-plugin-fbsdk/www/facebook-browser.js", "platforms/browser/www/cordova.js", "platforms/browser/platform_www/cordova.js" ] diff --git a/tests/plugin.xml b/tests/plugin.xml index bb440545e..d8ddef1cc 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -2,10 +2,10 @@ + id="cordova-plugin-fbsdk-tests" + version="4.0.1"> Facebook Connect Tests - \ No newline at end of file +