title: Installing the phonegap facebook plugin
body: <p>I'm trying to install the phonegap plugin for Facebook by Jos downloadable here: <a href="https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook" rel="nofollow noreferrer">https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook</a></p>
  
  <p>I've got the folder structure set up like this:</p>
  
  <pre><code>src/com/facebook/android/*.java
  src/com/hipsnip/plugins/facebook/FacebookAuth.java
  src/com/my_app/app/App.java
  libs/phonegap-1.0.0.jar
  /res/xml/plugins.xml
  assets/www/index.html facebook.js phonegap-1.0.0.js
  </code></pre>
  
  <p>I've added the plugin to the plugin.xml file like so:</p>
  
  <pre><code>&lt;plugin name="facebook" value="com.hipsnip.plugins.facebook.FacebookAuth" /&gt;
  </code></pre>
  
  <p>I've added the facebook.js to my index.html, and have the following function (which gets triggered by pressing a button):</p>
  
  <pre><code>function facebook_login()
  {
    var appId = "1234"; // this is your facebook app id change me
  
    window.plugins.facebook.authorize(appId,function(res){
      alert(res.name);
    });
  });
  </code></pre>
  
  <p>});
  }</p>
  
  <p>The app opens up a new browser window (I suspect that's what it is) but all it displays is my application without running javascript.
  LogCat shows the following error: </p>
  
  <pre><code>file:///android_asset/www/index.html: Line 95 : TypeError: Result of expression 'window.plugins.facebook' [undefined] is not an object.
  </code></pre>
  
  <p>Thanks for any help you can give (I suspect it has to do with the way that I've set up the folders, or the way I've added the plugin.xml, but I really don't have a clue)!</p>