2012-11-29 91 views
5

我是新iOS SDK中的Facebook SDK。 我爲什麼而建項目得到這個錯誤...Facebook iOS SDK 3.1.1與Xcode 4.5.2錯誤

我只需創建與IOS教程Facebook的SDK基礎的一步一個新的項目..

  • 下載Facebook SDK(我用3.1.1 )
  • 的Xcode(I使用4.5.2)
  • 加入 「-lsqlite3.0」 在Other Linker FlagsBuild Setting
  • 加入FacebookSDK.framework
  • 加入FacebookSDKRe sources.bundle
  • 加入FBUserSettingsViewResources.bundle

,我嘗試建立,一切就OK了..所以我繼續寫上AppDelegate中

- (BOOL)application:(UIApplication *)application 
      openURL:(NSURL *)url 
    sourceApplication:(NSString *)sourceApplication 
     annotation:(id)annotation { 
    return [FBSession.activeSession handleOpenURL:url]; 
} 

#import <FacebookSDK/FacebookSDK.h> 

基本實現當我嘗試構建時,出現錯誤...這是日誌

Undefined symbols for architecture armv7: 
    "_OBJC_CLASS_$_ACAccountStore", referenced from: 
     objc-class-ref in FacebookSDK(FBSession.o) 
    "_ACFacebookAudienceFriends", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
    "_ACFacebookAppIdKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
    "_ACAccountTypeIdentifierFacebook", referenced from: 
     +[FBSession renewSystemAuthorization] in FacebookSDK(FBSession.o) 
    "_ACFacebookAudienceKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
    "_ACFacebookAudienceOnlyMe", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
    "_ACFacebookPermissionsKey", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
    "_OBJC_CLASS_$_ASIdentifierManager", referenced from: 
     objc-class-ref in FacebookSDK(FBSettings.o) 
    "_ACFacebookAudienceEveryone", referenced from: 
     -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
ld: symbol(s) not found for architecture armv7 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我發現這很奇怪,因爲我用的是相同的SDK,並與Scrumptious例如相同的設置,示例運行良好。同時,我得到這個錯誤...

什麼想法?

回答

23

我得到了答案... Facebook IOS SDK 3.1需要更多框架才能使用..它需要需要'帳戶','AdSupport'和'Social'框架可在IOS6上找到。由於Facebook SDK 3.1創建基於IOS6 ..

注意:您應該使用iOS6的特定框架的可選標誌,如果你想你的應用程序也建立較早版本的操作系統。它看起來像這樣。

enter image description here

+1

和libsqlite3.0.dylib也!謝謝,你救了我 –

+0

在我的情況下,它是**帳戶** – AVEbrahimi