Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to integrate Xamarin.Facebook.iOS?

gogolongogolon Member ✭✭

Hello,
I want to track how many downloads of my app come from Facebook ads, so I need to integrate its SDK. I decided to use the official Xamarin.Facebook NuGet: https://www.nuget.org/packages/Xamarin.Facebook/ but there are no examples on how to use it, which is a shame. I just followed the steps described on Facebook and I think I integrated it properly for Android (not sure though, is there any way to check it? Couldn't find), but when trying to follow the docs regarding iOS integration, I stuck at the moment when you have to paste this code to the AppDelegate:

`- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[FBSDKApplicationDelegate sharedInstance] application:application
    didFinishLaunchingWithOptions:launchOptions];
    return YES;
    }

  • (BOOL)application:(UIApplication *)application
    openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
    annotation:(id)annotation {
    return [[FBSDKApplicationDelegate sharedInstance] application:application
    openURL:url
    sourceApplication:sourceApplication
    annotation:annotation];
    }`

Does anyone know how to get it done in C# using the NuGet? I can't find a similar snippet anywhere in the web.

Tagged:

Best Answer

  • gogolongogolon Member ✭✭
    Accepted Answer

    Please close this thread. It turned out that Xamarin.Facebook is no longer maintained and I should use Xamarin.Facebook.Android and Xamarin.Facebook.iOS instead.

Answers

  • gogolongogolon Member ✭✭
    Accepted Answer

    Please close this thread. It turned out that Xamarin.Facebook is no longer maintained and I should use Xamarin.Facebook.Android and Xamarin.Facebook.iOS instead.

Sign In or Register to comment.