Skip to content

Commit

Permalink
Set new plugin id
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximBelov committed Sep 7, 2022
1 parent dcd3f84 commit 4f0ba4a
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<a name="4.0.1"></a>
# [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

<a name="4.0.0"></a>
# [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

Expand Down Expand Up @@ -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
* Updated browser after_prepare hook to get preferences including `APP_ID` and the new `FACEBOOK_BROWSER_SDK_VERSION` from package.json
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
- If you can, provide sample testing code.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cordova-plugin-facebook-connect
# cordova-plugin-fbsdk

> Use Facebook SDK in Cordova projects
Expand All @@ -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. "&amp;".
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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"
```
4 changes: 2 additions & 2 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -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**:

Expand Down Expand Up @@ -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?
Expand Down
6 changes: 3 additions & 3 deletions docs/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-facebook-connect"
version="4.0.0">
id="cordova-plugin-fbsdk"
version="4.0.1">

<name>Facebook Connect</name>

Expand All @@ -13,7 +13,7 @@
Cordova application as you use in your web application.
</description>

<repo>https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect</repo>
<repo>https://github.com/MaximBelov/cordova-plugin-fbsdk</repo>

<license>Apache 2.0</license>

Expand Down
4 changes: 2 additions & 2 deletions scripts/browser/after_prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
6 changes: 3 additions & 3 deletions tests/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-facebook-connect-tests"
version="4.0.0">
id="cordova-plugin-fbsdk-tests"
version="4.0.1">
<name>Facebook Connect Tests</name>
<license></license>

<js-module src="tests.js" name="tests"></js-module>
</plugin>
</plugin>

0 comments on commit 4f0ba4a

Please sign in to comment.