I want to share some text and image on Facebook. For that I am using FBSDKShareDialog
, but it's giving following linker error. I am using 4.5.1 version of facebook sdk.
FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init];
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fbauth2://"]]){
dialog.mode = FBSDKShareDialogModeNative;
}
else {
dialog.mode = FBSDKShareDialogModeBrowser; //or FBSDKShareDialogModeAutomatic
}
//dialog.shareContent = content;
dialog.delegate = self;
dialog.fromViewController = self;
[dialog show];
error is :
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBSDKShareDialog", referenced from: objc-class-ref in SearchVC.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)