Open qispark opened 4 years ago
I have the same issue.
Yes It would be nice to have a clear instructions on how to do that.
I come here looking for this. Thanks for the link to the archive
Also notice you should use FBSDKApplicationDelegate instead of ApplicationDelegate. But xcode will tell you about this when you try to build the app
@neiker In what file do you change this : use FBSDKApplicationDelegate instead of ApplicationDelegate ?
@Dev-Ditrict-Web on AppDelegate.m
Hey Everyone,
I was look for the same objective-c instructions and managed to integrate the fbsdk finally, i am posting it below for people who are still having trouble finding/implementing it.
Include the FBSDKCoreKit at the top of the AppDelegate.m
file
#import "AppDelegate.h"
// add this next line
#import <FBSDKCoreKit/FBSDKCoreKit.h>
then under your @implementation AppDelegate
add these snippets at the last line before your @end
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
];
// Add any custom logic here.
return handled;
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
];
// Add any custom logic here.
return handled;
}
I hope this will help someone who is finding a way to integrate fbsdk, cheers happy coding.
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
gives Implementing deprecated method
warning
React Native projects for iOS are still based on Objective-C, however the link to the Get Started guide in README.md, section 3.2 ("Follow steps 3 and 4 in the Getting Started Guide for Facebook SDK for iOS.") no longer contain Objective-C instructions.
FWIW, the most recent archive of the Getting Started Guide still contains instructions for Obj-C. April 14 archive of Getting Started
I was able to use those instructions but I had to replace ApplicationDelegate with FBSDKApplicationDelegate. Perhaps these instructions should be included inside README.md.