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

automatically adding FACEBOOK_APP_ID and FACEBOOK_DISPLAY_NAME to *-Info... #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ We currently tested FacebookSDK for following platforms and versions:
##Prerequisites

###iOS
Download the latest [FacebookSDK](https://developers.facebook.com/docs/ios/), and follow the [getting started guideline](https://developers.facebook.com/docs/ios/getting-started/).
Download the latest [FacebookSDK](https://developers.facebook.com/docs/ios/), and follow the [getting started guideline](https://developers.facebook.com/docs/ios/getting-started/).
This plugin automatically adds FACEBOOK_APP_ID and FACEBOOK_DISPLAY_NAME to *-Info.plist via variables

The guideline is well documented and people at Facebook may change stuff in the future, so we stick to that instead of fancy cordova plugin hacks (well, cordova people also modify plugin flow too).

Expand All @@ -46,7 +47,7 @@ Here is what to do for Android before installing our plugin.

##Installing the plugin
To add this plugin just type:
```cordova plugin add https://github.com/ccsoft/cordova-facebook.git```
```cordova plugin add https://github.com/ccsoft/cordova-facebook.git --variable FACEBOOK_APP_ID=[...] --variable FACEBOOK_DISPLAY_NAME=[...]```

To remove this plugin type:
```cordova plugin remove com.ccsoft.plugin.CordovaFacebook```
Expand Down
8 changes: 8 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<author>CCSoft</author>
<keywords>facebook,cordova,ccsoft</keywords>
<license>Apache 2.0 License</license>
<preference name="FACEBOOK_APP_ID" />
<preference name="FACEBOOK_DISPLAY_NAME" />

<engines>
<engine name="cordova" version=">=3.0.0" />
Expand Down Expand Up @@ -50,6 +52,12 @@
<param name="ios-package" value="CordovaFacebook" />
</feature>
</config-file>
<config-file target="*-Info.plist" parent="FacebookAppID">
<string>$FACEBOOK_APP_ID</string>
</config-file>
<config-file target="*-Info.plist" parent="FacebookDisplayName">
<string>$FACEBOOK_DISPLAY_NAME</string>
</config-file>
<header-file src="src/ios/CordovaFacebook.h" />
<source-file src="src/ios/CordovaFacebook.m" />

Expand Down