title: Facebook Login with PhoneGap/Cordova App
body: <p>I recently integrated the phonegap-facebook-plugin (<a href="https://github.com/phonegap/phonegap-facebook-plugin">https://github.com/phonegap/phonegap-facebook-plugin</a>) into both iOS and Android (same app).</p>
  
  <p>I want to do something that I believe to be simple: by-pass the call to native facebook for login/authentication and <strong>always use the web dialog</strong>. How does one go about accomplishing this?</p>
  
  <p>My login code currently looks like this:</p>
  
  <p>Init code:</p>
  
  <pre><code>//facebook initialization
  FB.init({
      appId: 'xxxxxxxxxxxx', //'&lt;%#= FB_APP_ID %&gt;',//'',
      nativeInterface: CDV.FB,
      useCachedDialogs: false
  });
  </code></pre>
  
  <p>And the login call is:</p>
  
  <pre><code>FB.login(function(response) {
                              if (response.authResponse) {
                                  // connected
  
                                      me.signInFacebook({
                                      token: response.authResponse.accessToken,
                                      email: response.authResponse.email,
                                      success: function (data) {
  
                                      // hide login view and show tabview
                                       form.destroy();
  
                                     // continue whatever action was previously happening
                                          me.continueAction(tabIndexBack, callback);
                                      },
                                      failure: function (response) {
                                          // show errors                                      Ext.Viewport.down('tabscontainerview').setActiveItem(3);
                                      }
                                  });
                              } else {
                                   //go back
                                  Ext.Viewport.down('tabscontainerview').setActiveItem(3);
                                  alert('fb login error');
                              }
                          },{ scope: "email" });
  </code></pre>
  
  <p>Thanks for your help!!</p>