'FacebookSDK/FacebookSDK.h' file not found
cordova, facebook, ios
Solution
I encountered the same problem today.
Installing this plugin using the plugin register does not work (for iOS) at the moment.
You must clone the repository (`phonegap-facebook-plugin`) to your local file system, say `$HOME/src/phonegap-facebook-plugin`. And then install the plugin pointing to that path, e.g. `cordova plugin add $HOME/src/phonegap-facebook-plugin ...`
It turns out that `FacebookSDK.framework` isn't installed properly when fetching through the plugin registry. It should look like this:
$ ls -l plugins/com.phonegap.plugins.facebookconnect/platforms/ios/FacebookSDK.framework/
total 24
lrwx------ 1 mjl staff 24 Aug 15 15:23 FacebookSDK -> ./Versions/A/FacebookSDK
lrwx------ 1 mjl staff 20 Aug 15 15:23 Headers -> ./Versions/A/Headers
lrwx------ 1 mjl staff 22 Aug 15 15:23 Resources -> ./Versions/A/Resources
drwx------ 4 mjl staff 136 Aug 15 15:23 Versions
But the symlinks aren't preserved when installing through the plugin registry... They are preserved when installing from the local file system though.
Problem
I already installed the latest version of phonegap-facebook-plugin But when i build the project, I got the error message below. I tried many solutions mentioned at stackoverflow and other websites with no positive result. ``` com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m:11: Et3arrafApp/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.h:11:9: fatal error: 'FacebookSDK/FacebookSDK.h' file not found #import <FacebookSDK/FacebookSDK.h> ^ 1 error generated. ** BUILD FAILED ** The following build commands failed: CompileC build/Et3arrafApp.build/Debug-iphonesimulator/Et3arrafApp.build/Objects-normal/i386/FacebookConnectPlugin.o Et3arrafApp/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: /Users/apple/Desktop/et3arraf/platforms/ios/cordova/build: Command failed with exit code 65 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:753:16) at Process.ChildProcess._handle.onexit (child_process.js:820:5) ```