Windows SDK for Facebook

The information on this page is about a 3rd-party SDK that is not maintained by Facebook. Discussion here is not an endorsement or recommendation by Facebook. In addition, such inclusion is not intended to imply, directly or indirectly, that the SDK author endorses or has any affiliation with Facebook. Feedback and bugs should be directed to the SDK author.

The Windows SDK for Facebook brings Facebook integration to developers creating Universal Windows Platform-based apps. It allows for integration with Facebook Login, Sharing, Graph API, App Events, and App Ads. The SDK is maintained by Microsoft. Directions for installing and configuring the SDK can be found at http://microsoft.github.io/winsdkfb/.

Instructions for using App Events for install tracking can be found below. Documentation for other features can be found at the following external locations:

App Events

Adding App Events to your app lets you learn more about how people are using your app through Facebook Analytics. With Facebook Analytics you can get insight into how many people are launching your app, how often people are making a purchase, and many other built-in events.

The Windows SDK for Facebook supports only one app event, app activation. In order to receive install tracking for mobile app install ads, you must log this event when your app launches.

To log app activations from a C# application, modify the OnLaunched method of your app:

protected async override void OnLaunched(LaunchActivatedEventArgs e)
{
    // Configure the Facebook session to use your Facebook App ID
    FBSession session = FBSession.ActiveSession;
    session.FBAppId = "<your app id>";

    // Log the app activation
    FBSDKAppEvents.ActivateApp();
}