FacebookManager 0.0.1

FacebookManager 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License zlib
ReleasedLast Release Dec 2014

Maintained by Unclaimed.



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.

Installation & Use

To integrate FacebookManager into your project:

  1. first create a Facebook Application / Page for your application using the documentation found under Register Your App. This will give you a Facebook App ID.
  2. Add the App ID and optionally the name into your iOS bundle's Info.plist file using the instructions under Configure the plist.
  3. Add FacebookManager.m and FacebookManager.h to your project.
  4. In your application's startup logic, make this call [[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.
  5. It's a good idea to step through the publishInstall logic in the debugger, on a device or in the simulator, to make sure that you are seeing a single publish of event=MOBILE_APP_INSTALL which 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.