cordova 3.3. facebook integration for iOS


2014 - 04 - 08 17: 38: 33.210 javacourseblog[10129: 907] ERROR: Plugin 'org.apache.cordova.facebook.Connect'
not found,
or is not a CDVPlugin.Check your plugin mapping in config.xml.
2014 - 04 - 08 17: 38: 33.211 javacourseblog[10129: 907] - [CDVCommandQueue executePending][Line 158] FAILED pluginJSON = ["org.apache.cordova.facebook.Connect1333284177", "org.apache.cordova.facebook.Connect", "login", ["email"]]

this my error;

i tried to Facebook login& logout using cordova

i followed this bellow blog page.

android facebook login is working fine. but iOS build it shows above error.i followed

Phonegap 3.0 IOS plugins not found

also its also not helping for me.. please any one can help...


step 1: create cordova project via telnet:

cordova create facebook Facebook

step 2: add facebook cordova plugin

cordova plugin add

step 3: remove and add fb id & app name .open the plugin.xml file from

  find and remove below 2 line

 after to add this 2 line 

step 4 add your platform for android or ios cordova platform add ios step 5 1.Now Make reference of cordova.js ,cdv-plugin-fb-connect.js and facebook-js-sdk.js in your www folder 2.remove your old code form index.html.add follwoing code find replace your fb app id in index.html '

<!DOCTYPE html>
            <meta charset="utf-8" />
            <meta name="format-detection" content="telephone=no" />
            <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See -->
            <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
            <link rel="stylesheet" type="text/css" href="css/index.css" />
            <title>Hello World</title>
            <div class="app">
                <h1>Apache Cordova</h1>
                <div id="deviceready" class="blink">
                    <p class="event listening">Connecting to Device</p>
                    <p class="event received">Device is Ready</p>
            <script type="text/javascript" src="cordova.js"></script>
            <script type="text/javascript" src="js/index.js"></script>
            <script type="text/javascript" charset="utf-8" src="cdv-plugin-fb-connect.js"></script>
            <script type="text/javascript" charset="utf-8" src="facebook_js_sdk.js"></script>

            <div id="data">Hello Facebooktesters, loading ...</div>

        <button onclick="login()">Login</button>
        <button onclick="me()">Me</button>

        <script type="text/javascript">
            document.addEventListener('deviceready', function() {
                try {
                    alert('Device is ready! Make sure you set your app_id below this alert.');
                        appId : "Your fb Id",
                        nativeInterface : CDV.FB,
                        useCachedDialogs : false
                    document.getElementById('data').innerHTML = "FB init executed";
                } catch (e) {
            }, false);

            function me() {
                FB.api('/me/friends', {
                    fields : 'id, name, picture'
                }, function(response) {
                    if (response.error) {
                    } else {
                        var data = document.getElementById('data');
                        fdata =;
                        console.log("fdata: " + fdata);
                            var d = document.createElement('div');
                            d.innerHTML = "<img src="+item.picture+"/>" +;
                    var friends =;
                    for ( var k = 0; k < friends.length && k < 200; k++) {
                        var friend = friends[k];
                        var index = 1;

                        friendIDs[k] =;
                        //friendsInfo[k] = friend;
                    console.log("friendId's: " + friendIDs);

            function login() {
                FB.login(function(response) {
                    if (response.authResponse) {
                        alert('logged in');
                    } else {
                        alert('not logged in');
                }, {
                    scope : "email"
         <!-- <script type="text/javascript">
            </script> -->

step 6: open your project in xcode and open ios plist file and add your fb appid and fb app_name step 7 go to your codova config.xml.find bellow this line exits or not..if not exits(ios) add to step..

<feature name="org.apache.cordova.facebook.Connect">
        <param name="ios-package" value="FacebookConnectPlugin" />

step 8

cordova build

step 9 again check plist file step 10 run your ios simulator

Make sure you install your facebook phonegap plugin in proper way. Don't use plugman.

cordova plugin add --variable APP_ID="xxxxxxxxxxxxxxx" --variable APP_NAME=“YourAppName”

Need Your Help

JPA: Store fileAttachment into the database

mysql jpa attachment playframework

I would like to know if there is any way I can store a fileAttachment directly into the database with JPA.

android: ViewPager with more than 100 webview

android android-viewpager viewpage

I've viewpager that has 604 webviews and i want to load 5 pages every time that user scrolling the pager, like that: