FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:@"http://en.wikipedia.org/wiki/Facebook"];
NSURL *imageURL =
[NSURL URLWithString:@"http://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Facebook_Headquarters_Menlo_Park.jpg/2880px-Facebook_Headquarters_Menlo_Park.jpg"];
[email protected]"This is facebook test";
[email protected]"Hello";
content.imageURL=imageURL;
FBSDKShareButton *shareButton = [[FBSDKShareButton alloc] init];
shareButton.shareContent = content;
shareButton.center = self.view.center;
[self.view addSubview:shareButton];
我用facebook-ios-sdk-3.24.0.pkg,我使用上面的代碼在facebook上使用fbsdksharekit進行鏈接共享。此代碼工作正常,但在關閉xcode並重新打開xcode6.0後,它顯示下面的錯誤。 FBSDKCoreKit/FBSDKCoreKit.h
和FBSDKShareKit/FBSDKShareKit.h
找不到。如何使用FBSDKShareLink在Facebook上分享鏈接?
我導入這些框架,即FBSDKCoreKit/FBSDKCoreKit.h
和FBSDKShareKit/FBSDKShareKit.h
到viewcontroller.m
文件。
可以任何一個告訴我什麼是問題。提前感謝。
Facebook的IOS-SDK-3.24.0.pkg是它最新的SDK? –
這是SDK 4.6版的下載鏈接https://origincache.facebook.com/developers/resources/?id=FacebookSDKs-iOS-20150910.zip –
首先感謝您的回覆。 FacebookSDKs-iOS-20150910 ie 4.6.在這個SDK中,當我運行應用程序時,它顯示以下錯誤:146架構重複的符號架構i386 –