2012-10-10 134 views
15

當我嘗試將facebook集成到我的應用程序時,我得到所有這些錯誤和約18個錯誤。將Facebook與iOS集成

Undefined symbols for architecture i386: 
"_ACAccountTypeIdentifierFacebook", referenced from: 
    +[FBSession renewSystemAuthorization] in FacebookSDK(FBSession.o) 
"_ACFacebookAppIdKey", referenced from: 
    -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
"_ACFacebookAudienceEveryone", referenced from: 
    -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) 
"_ACFacebookAudienceFriends", referenced from: 
    -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] 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: 

即時通訊使用最新的Facebook指令如何將Facebook添加到我的網頁,但我正在與iOS 4.3及以上。所以它需要迎合4.3。我已將Accounts.framework設置爲可選。任何人都知道這些錯誤是什麼意思?我也嘗試添加沒有鏈接的其他任何實現文件。產生

的錯誤,每次我訪問FBSession或FBConnect等

+0

試着看一下這個問題: http://stackoverflow.com/questions/12721606/facebook-sdk3- 1和xcode-4-5-linker-error/12742642 – Misa

回答

35

爲了記錄在案:我們希望您使用的XCode 4.5,與Facebook的SDK 3.1開發描述here

Account.framework,Social.framework和AdSupport.framework程式都需要(如描述here),但使用如果你想爲老版本的iOS版本構建'可選'標誌。

祝你好運。

+1

謝謝。是的整理出來。 :) – CodeGeek123

+0

非常感謝你.... –

1

我覺得Accounts.framework需要被需要。但它僅在iOS 5中實現,後面請參閱developer reference以獲取更多信息。

4

通過Account.framework,您還必須添加Social.framework和AdSupport.framework。

+0

是的。不能這樣做,因爲我在Xcode 4.3.3 – CodeGeek123

0

通過升級到xcode 4.5.1解決此問題,然後添加社會和adsupport框架以及-lsqlitee3或如上所述。我之前添加了lsqlite3,但它在頂部顯示了多個值,因此我只是將基本sdk註釋無用,並且它可以工作。

3

如果您從其他項目拖放Adsuport,Accounts或Social庫,並選擇「將項目複製到目標組的文件夾中」,AdSuport和Social目錄將創建到您的應用程序源文件夾中,並且您將收到此鏈接器錯誤,刪除目錄和項目的球泡階段將庫添加 - >鏈接二進制, 您可能還需要添加libsqlite3.dylib