-4

我有一个 NSString,我想将它发布在我的墙上。我在这里阅读了文件。我遵循这一步。第二步,我下载了sdk。在 sdk 文件夹中的 src 文件夹中有 facebook-ios-sdk.xcodeproj 文件。我打开文件并运行它。但我不知道如何导入我的项目。此外,文件夹中有示例项目,但它们不起作用。

我从这里下载 FacebookSDK.framework 。示例项目在 sdk 中工作,但是当我导入框架并在框架中获取实例对象时,出现 15 个错误。请帮我。从现在开始谢谢你。FBLoginView* fb = [[FBLoginView alloc] init]; // 我实例化了它

错误是;

Ld /Users/apple/Library/Developer/Xcode/DerivedData/FaceDeneme-gatrfdmgbcwtpyecvenlafosmqfn/Build/Products/Debug-iphonesimulator/FaceDeneme.app/FaceDeneme normal i386
    cd /Users/apple/Documents/FaceDeneme
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
-L/Users/apple/Library/Developer/Xcode/DerivedData/FaceDeneme-gatrfdmgbcwtpyecvenlafosmqfn/Build/Products/Debug-iphonesimulator
-L/Users/apple/Documents/FaceDeneme -F/Users/apple/Library/Developer/Xcode/DerivedData/FaceDeneme-gatrfdmgbcwtpyecvenlafosmqfn/Build/Products/Debug-iphonesimulator
-F/Users/apple/Documents/FaceDeneme/../FacebookSDK -filelist /Users/apple/Library/Developer/Xcode/DerivedData/FaceDeneme-gatrfdmgbcwtpyecvenlafosmqfn/Build/Intermediates/FaceDeneme.build/Debug-iphonesimulator/FaceDeneme.build/Objects-normal/i386/FaceDeneme.LinkFileList
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreLocation -framework FacebookSDK -framework Accounts -o /Users/apple/Library/Developer/Xcode/DerivedData/FaceDeneme-gatrfdmgbcwtpyecvenlafosmqfn/Build/Products/Debug-iphonesimulator/FaceDeneme.app/FaceDeneme

Undefined symbols for architecture i386:   "_sqlite3_open_v2", referenced from:
      ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_exec", referenced from:
      ___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_close", referenced from:
      ___23-[FBCacheIndex dealloc]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)   "_sqlite3_finalize", referenced from:
      _releaseStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_errmsg", referenced from:
      _releaseStatement in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      _initializeStatement in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
      ...   "_sqlite3_bind_text", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_bind_double", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_bind_int", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_step", referenced from:
      -[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _dropTrimmingTable] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
      ...   "_sqlite3_prepare_v2", referenced from:
      _initializeStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_reset", referenced from:
      _initializeStatement in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_text", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_double", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)   "_sqlite3_column_int", referenced from:
      -[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
      -[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

1 回答 1

4

您应该再次遵循 Facebook 设置指南。你没有正确设置它,你还没有准备好使用它。您那里的错误告诉您您没有包含 sqlite3 库。

Facebook 库需要此库,您的工作是确保它也存在于您的项目中。这是设置的一部分,请查看以下链接:

https://developers.facebook.com/docs/getting-started/getting-started-with-the-ios-sdk/#project

https://github.com/facebook/facebook-ios-sdk

于 2012-08-15T13:21:21.407 回答