我有一个NSString,我想在我的墙上发布它。我阅读了文件here。我遵循这一步。在第二步,我下载sdk。在src文件夹中的src文件夹中有facebook-ios-sdk.xcodeproj文件。我打开文件并运行它。但我不知道如何导入我的项目。此外,文件夹中有示例项目,但它们不起作用。
我从here下载了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)
答案 0 :(得分:4)
您应该再次关注Facebook设置指南。你还没有正确设置它,你还没有准备好使用它。你在那里的错误告诉你,你没有包含sqlite3库。
这个库是Facebook库所必需的,确保它也存在于您的项目中是您的工作。这是设置的一部分,请查看以下链接:
https://developers.facebook.com/docs/getting-started/getting-started-with-the-ios-sdk/#project