Debian Codegraph @

tools/build-tool/data/ios/services/facebook/README.adoc

raw
1 ## facebook
2
3 Integration with https://developers.facebook.com/docs/ios/[Facebook SDK for iOS]. Right now this integration:
4
5 * Notifies Facebook when users run your application on iOS. This may be useful to see installation statistics inside _Facebook analytics_.
6 * The Facebook SDK may also log in-app purchases done by users, if you set appropriate option in the Facebook application config.
7 * In Pascal, right now you can only call `TFacebook.LoginButton` (use `CastleFacebook` unit) to show the Facebook login button. Users can click it to login/logout from the Facebook application. It does not serve much purpose now except checking that the integration actually works (e.g. you pointed to the correct Facebook app).
8
9 When adding this to the `CastleEngineManifest.xml`, set also parameters describing application id and name for Facebook:
10
11 [,xml]
12 ----
13 <service name="facebook">
14 <parameter key="app_id" value="11223344" />
15 <parameter key="app_title" value="My Application Name" />
16 </service>
17 ----
18
19 To use this:
20
21 * You will need to create a new application on Facebook: https://developers.facebook.com/apps or you can follow the link from https://developers.facebook.com/docs/ios/getting-started .
22 +
23 In Facebook application, configure at least the _Bundle ID_. It must match the `qualified_name` / `override_qualified_name` you set in `CastleEngineManifest.xml` for iOS. The https://developers.facebook.com/docs/ios/getting-started[getting started guide] also advices to turn on _Single Sign On_.
24 +
25 In `CastleEngineManifest.xml`, set the `app_id` and `app_title` for the `facebook` service to match your Facebook application.
26
27 * We use CocoaPods to download the Facebook frameworks, so make sure you have CocoaPods installed. See https://castle-engine.io/ios_services .
28 * Everything else mentioned on https://developers.facebook.com/docs/ios/getting-started[getting started guide] is done for you automatically -- the project is out-of-the-box integrated with Facebook, using proper declarations in `Info.plist` and Objective-C code.
29 +
30 Note that compiling the Facebook SDK in latest Xcode will produce a large number of warnings (64, last time I checked...). That's a problem of Facebook SDK -- we cannot help it. You can just ignore them (or submit them to Facebook devs).