Reputation: 2535
I downloaded the code from https://github.com/facebook/facebook-ios-sdk
But none of the sample projects compile in Xcode. I have read the readme.txt and it doesn't help.
The error is: 'FacebookSDK/FacebookSDK.h' file not found
There is no folder called FacebookSDK, it's actually called src. When I change the code to say src the new error is: ld: framework not found FacebookSDK clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone download the code and get the samples to work?
Upvotes: 1
Views: 5756
Reputation: 123
If you install the package to another location besides ~/Documents, you need to change the Framework Search Path for the sample projects.
When you open the project up in XCode, click the project info (e.g. blue "HelloFacebookSample" in the file browser.
Doubleclick the value and you'll see an entry that is like:
$(SRCROOT/../../../../Documents/FacebookSDK
Double click that value and change it to point to the destination folder where you placed the SDK.
In my case, I installed the SDK to /Dropbox/SDKs/FacebookSDK
so I changed the value to
$(SRCROOT/../../../../SDKs/FacebookSDK
(the 4 ../
are because it's relative to the HelloFacebookSample project)
Upvotes: 1
Reputation: 8066
Facebook SDK 3.0 for iOS with samples
For more details https://developers.facebook.com/ios/
Upvotes: 1
Reputation: 46
I wrestled with this same problem for a while before discovering that there is a not-so-obvious file that is supposed to be downloaded and installed (versus just getting the ZIP file and its contents). The file is called FacebookSDK-3.0.pkg and I found it at:
(first link provided when searching for the filename) I installed it and the samples work fine now.
Upvotes: 3