Search code examples
iphonefacebookfacebook-ios-sdk

Facebook iOS SDK sample code doesn't compile


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?


Solution

  • 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:

    http://www.google.com/url?sa=t&rct=j&q=facebooksdk-3.0.pkg&source=web&cd=1&ved=0CEgQFjAA&url=https%3A%2F%2Fgithub.com%2Fdownloads%2Ffacebook%2Ffacebook-ios-sdk%2FFacebookSDK-3.0.pkg&ei=Mg8kULzOLofgiALg14DwDQ&usg=AFQjCNF0i0Vkq_cPsOvfrs5nb_IOUR6XhA&sig2=kERJcdvR7UgAB6mr-RUi6w

    (first link provided when searching for the filename) I installed it and the samples work fine now.