I'm trying to install the cordova Facebook plugin, Phonegap-Facebook-Plugin, but am having some issues and I'm disoriented because I don't understand how Cordova plugins work in general, so any light anyone can provide would be greatly appreciated.
I have installed the plugin using the following line as indicated on the ReadMe:
cordova -d plugin add /path/to/cloned/phonegap-facebook-plugin --variable APP_ID="123456789" --variable APP_NAME="myApplication"
I have the correct plugin information in my config.xml:
<plugin name="FacebookConnectPlugin" value="FacebookConnectPlugin" />
<access origin="https://m.facebook.com" />
<access origin="https://graph.facebook.com" />
<access origin="https://api.facebook.com" />
<access origin="https://*.fbcdn.net" />
<access origin="https://*.akamaihd.net" />
And I have the correct plugin information in the Info.plist in the ios folder:
<key>FacebookAppID</key>
<string>** my app id **</string>
<key>FacebookDisplayName</key>
<string>>** my app name **</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>**fb + my app id ** </string>
</array>
</dict>
</array>
However when I go to build this with the Ionic build process, I get the following error:
clang: error: no such file or directory: '/path/to/my/app/platforms/ios/goodMood/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m'
And indeed there IS no such file or directory, because this directory seems to have been put, by the Cordova CLI, in the following directory:
/path/to/my/app/plugins/com.phonegap.plugins.facebookconnect
Which means this problem is essentially the opposite of the issue opened here:
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/601
Any ideas on how I can reconcile this seemingly very straight-forward problem???
You can install a plugin from a url too. Re-create your Cordova project like this:
cordova create YOUR_APP_NAME
cd YOUR_APP_NAME
cordova platform add ios android
cordova -d plugin add https://github.com/Wizcorp/phonegap-facebook-plugin --variable APP_ID="123456789" --variable APP_NAME="myApplication"
cordova build