forked from jeduan/cordova-plugin-facebook4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.xml
199 lines (172 loc) · 7.89 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?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-facebook4"
version="6.4.0">
<name>Facebook Connect</name>
<description>
This is the official plugin for Facebook in Apache Cordova/PhoneGap!
The Facebook plugin for Apache Cordova allows you to use the same JavaScript code in your
Cordova application as you use in your web application.
</description>
<repo>https://github.com/jeduan/cordova-plugin-facebook4</repo>
<license>Apache 2.0</license>
<preference name="APP_ID" />
<preference name="APP_NAME" />
<preference name="FACEBOOK_HYBRID_APP_EVENTS" default="false" />
<preference name="FACEBOOK_ANDROID_SDK_VERSION" default="5.13.0"/>
<engines>
<!-- Requires > 3.5.0 because of the custom Framework tag for iOS [CB-6698] -->
<!-- Requires > 4.0.0 because of the Framework tag for Android that uses gradle -->
<engine name="cordova-android" version=">=3.5.0" />
<engine name="cordova-ios" version=">=3.5.0" />
</engines>
<!-- android -->
<platform name="android">
<js-module src="www/facebook-native.js" name="FacebookConnectPlugin">
<clobbers target="facebookConnectPlugin" />
</js-module>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="FacebookConnectPlugin">
<param name="android-package" value="org.apache.cordova.facebook.ConnectPlugin" />
<param name="onload" value="true" />
</feature>
<access origin="https://m.facebook.com" />
<access origin="https://graph.facebook.com" />
<access origin="https://api.facebook.com" />
<access origin="https://*.fbcdn.net" />
<access origin="https://*.akamaihd.net" />
<preference name="android-minSdkVersion" value="15" />
</config-file>
<source-file src="src/android/facebookconnect.xml" target-dir="res/values" />
<!-- Used for cordova-android 6 -->
<config-file target="res/values/facebookconnect.xml" parent="/*">
<string name="fb_app_id">$APP_ID</string>
<string name="fb_app_name">$APP_NAME</string>
<bool name="fb_hybrid_app_events">$FACEBOOK_HYBRID_APP_EVENTS</bool>
</config-file>
<!-- Used for cordova-android 7 -->
<config-file target="app/src/main/res/values/facebookconnect.xml" parent="/*">
<string name="fb_app_id">$APP_ID</string>
<string name="fb_app_name">$APP_NAME</string>
<bool name="fb_hybrid_app_events">$FACEBOOK_HYBRID_APP_EVENTS</bool>
</config-file>
<config-file target="AndroidManifest.xml" parent="application">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_app_id"/>
<meta-data android:name="com.facebook.sdk.ApplicationName" android:value="@string/fb_app_name" />
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/fb_app_name" />
</config-file>
<framework src="build.gradle" custom="true" type="gradleReference"/>
<!-- cordova plugin src files -->
<source-file src="src/android/ConnectPlugin.java" target-dir="src/org/apache/cordova/facebook" />
</platform>
<!-- ios -->
<platform name="ios">
<js-module src="www/facebook-native.js" name="FacebookConnectPlugin">
<clobbers target="facebookConnectPlugin" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="FacebookConnectPlugin">
<param name="ios-package" value="FacebookConnectPlugin"/>
<param name="onload" value="true" />
</feature>
<plugin name="FacebookConnectPlugin" value="FacebookConnectPlugin"/>
<access origin="https://m.facebook.com" />
<access origin="https://graph.facebook.com" />
<access origin="https://api.facebook.com" />
<access origin="https://*.fbcdn.net" />
<access origin="https://*.akamaihd.net" />
</config-file>
<header-file src="src/ios/FacebookConnectPlugin.h" />
<source-file src="src/ios/FacebookConnectPlugin.m" />
<config-file target="*-Info.plist" parent="FacebookAppID">
<string>$APP_ID</string>
</config-file>
<config-file target="*-Info.plist" parent="FacebookDisplayName">
<string>$APP_NAME</string>
</config-file>
<config-file target="*-Info.plist" parent="FacebookHybridAppEvents">
<string>$FACEBOOK_HYBRID_APP_EVENTS</string>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb$APP_ID</string>
</array>
</dict>
</array>
</config-file>
<config-file target="*-Info.plist" parent="NSAppTransportSecurity">
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
</config-file>
<config-file target="*-Info.plist" parent="LSApplicationQueriesSchemes">
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
</config-file>
<!-- Facebook SDK -->
<podspec>
<config>
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="FBSDKCoreKit" spec="5.15.0"/>
<pod name="FBSDKLoginKit" spec="5.15.0"/>
<pod name="FBSDKShareKit" spec="5.15.0"/>
</pods>
</podspec>
</platform>
<!-- browser -->
<platform name="browser">
<js-module src="www/facebook-browser.js" name="FacebookConnectPluginBrowser">
<clobbers target="facebookConnectPlugin" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="FacebookConnectPlugin">
<param name="browser-package" value="FacebookConnectPluginBrowser"/>
<param name="onload" value="true" />
</feature>
<plugin name="FacebookConnectPlugin" value="FacebookConnectPlugin"/>
<access origin="https://m.facebook.com" />
<access origin="https://connect.facebook.net" />
<access origin="https://graph.facebook.com" />
<access origin="https://api.facebook.com" />
<access origin="https://*.fbcdn.net" />
<access origin="https://*.akamaihd.net" />
</config-file>
</platform>
<!-- after_prepare hook to populate APP_ID -->
<hook type="after_prepare" src="scripts/after_prepare.js" />
</plugin>