title: How do I implement Facebook Mobile Install Ad tracking in Phonegap/Cordova project?
body: <p>Ok, so I've got a "completed" iOS phonegap/cordova project, using version 3.4 in xcode 5. I know I need to integrate the facebook sdk in order to track the installs for mobile ads.</p>
  
  <p>Will simply integrating the sdk as per Facebook's instructions here <a href="https://developers.facebook.com/docs/ios/getting-started/" rel="nofollow">https://developers.facebook.com/docs/ios/getting-started/</a> do the job, or do I need to use the entire facebook connect plugin as outlined here <a href="https://github.com/phonegap/phonegap-facebook-plugin" rel="nofollow">https://github.com/phonegap/phonegap-facebook-plugin</a> being that I only need to track installs?</p>
  
  <p>Also, when this is taken care of I need to add the following to the UIApplicationDelegate applicationDidBecomeActive selector</p>
  
  <pre><code>[FBSettings setDefaultAppID:YOUR_APP_ID];
  [FBAppEvents activateApp];    
  </code></pre>
  
  <p>Yet I can find no clear answer on exactly where I need to place this, (I have little to no knowledge of obj-c), where and in which file in my xcode project do I need to place this? I did find this out from a transcript of an open session on phonegap, it didn't help me much but may mean something to you:</p>
  
  <p><em>Sometimes, some SDK or others ask us to add some lines in the objective-C, like Facebook for "Mobile App Install Ads" they ask to add "[FBSettings publishInstall:YOUR_APP_ID]" in UIApplicationDelegate applicationDidBecomeActive selector - but with phonegap project, we have not this method, so is there a equivalent in the code generated by phonegap?
  A: If you are developing locally using Xcode, you can access this method in the application delegate class. This is not available inside of the PhoneGap Build service.</em></p>
  
  <p>Thanks for your help.</p>