|ReleasedLast Release||Dec 2014|
Maintained by Unclaimed.
|LOCLines of Code||158|
A very lightweight subset of the official Facebook iOS SDK useful just for tracking mobile app installations and being able to attribute them to Facebook Mobile App Ads For Installs. Specifically it implements a single initial ping and tracking event to your Facebook App using the Facebook Graph API. This flows the (iOS6+) advertiser identifier and the
fb_app_attribution data which the Facebook iOS app places on the system pasteboard if an install occured from the Facebook iOS app. The tracking data about use and installs will show up with a 2-day lag as daily-/weekly-/monthly-active user information and daily installs in your applications Insights, and it will show up as installs in near real-time during active Mobile App Ads campaigns. (Update: the new Insights dashboard no longer has 2-day lag, find it at https://www.facebook.com/insights/)
The code consolidates and compacts the logic found in FBUtility.m which is called from FBSettings.m and uses a standard
NSURLConnection instead of the heavier (but more useful in general cases)
FBRequest object of the full SDK.
If you are only interested in running Facebook Mobile App Install Ad Campaigns, this is all the Facebook SDK logic you need.
FacebookManager into your project:
Info.plistfile using the instructions under Configure the
FacebookManager.hto your project.
[[FacebookManager sharedInstance] publishInstall]. Since this code uses
NSURLConnection's asynchronous callbacks it will not stall your application launch, but feel free to defer this logic until after you bring up your UI.
publishInstalllogic in the debugger, on a device or in the simulator, to make sure that you are seeing a single publish of
event=MOBILE_APP_INSTALLwhich succeeds, as there are enough strange ID's and keys and other nonsense you have to keep in sync and just right between the Facebook App page and your bundle-id, etc.
Once you've shipped your iOS application follow the rest of the instructions at Mobile App Ads for Installs to create some test ads.