diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui
index f9210c6..e69c082 100644
--- a/libempathy-gtk/empathy-account-widget-jabber.ui
+++ b/libempathy-gtk/empathy-account-widget-jabber.ui
@@ -136,6 +136,21 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkLabel" id="label_username_f_example">
+                <property name="xalign">0</property>
+                <property name="xpad">3</property>
+                <property name="label" translatable="yes">If you are http://facebook.com/badger, enter badger.
+Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to define your Facebook alias.</property>
+                <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -158,7 +173,7 @@
       </packing>
     </child>
     <child>
-      <object class="GtkExpander" id="expander1">
+      <object class="GtkExpander" id="expander_advanced">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <child>
@@ -601,4 +616,97 @@
       </packing>
     </child>
   </object>
+  <object class="GtkVBox" id="vbox_fb_simple">
+    <property name="visible">True</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkLabel" id="label_id_fb_simple">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">What is your Facebook ID?</property>
+      </object>
+      <packing>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="alignment_simple_fb_id">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0</property>
+        <property name="xscale">0.34999999403953552</property>
+        <property name="yscale">0.34999999403953552</property>
+        <property name="top_padding">6</property>
+        <property name="bottom_padding">3</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">4</property>
+            <child>
+              <object class="GtkEntry" id="entry_id_fb_simple">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x2022;</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label_fb_example">
+                <property name="visible">True</property>
+                <property name="xalign">0.10000000149011612</property>
+                <property name="label" translatable="yes">If you are http://facebook.com/badger, enter badger.
+Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to define your Facebook alias.</property>
+                <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label_password_fb_simple">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="ypad">6</property>
+        <property name="label" translatable="yes">What is your Facebook password?</property>
+      </object>
+      <packing>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="alignment3">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="yalign">0</property>
+        <property name="xscale">0.34999999403953552</property>
+        <property name="yscale">0.5</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkEntry" id="entry_password_fb_simple">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="visibility">False</property>
+            <property name="invisible_char">&#x2022;</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="position">3</property>
+      </packing>
+    </child>
+  </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 1cc84cb..4124388 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -940,6 +940,78 @@ account_widget_is_gtalk (EmpathyAccountWidget *self)
       "im-google-talk");
 }
 
+static gboolean
+account_widget_is_facebook (EmpathyAccountWidget *self)
+{
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+
+  return !tp_strdiff (empathy_account_settings_get_icon_name (priv->settings),
+      "im-facebook");
+}
+
+#define FACEBOOK_SUFFIX "@chat.facebook.com"
+
+static void
+facebook_id_widget_changed_cb (GtkWidget *entry,
+    EmpathyAccountWidget *self)
+{
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+  const gchar *account;
+
+  account_widget_entry_changed_common (self, GTK_ENTRY (entry), FALSE);
+
+  account = empathy_account_settings_get_string (priv->settings, "account");
+  if (!EMP_STR_EMPTY (account) &&
+      !g_str_has_suffix (account, FACEBOOK_SUFFIX))
+    {
+      gchar *tmp;
+
+      tmp = g_strdup_printf ("%s%s", account, FACEBOOK_SUFFIX);
+
+      DEBUG ("Change account from '%s' to '%s'", account, tmp);
+
+      empathy_account_settings_set_string (priv->settings, "account", tmp);
+      g_free (tmp);
+    }
+
+  empathy_account_widget_changed (self);
+}
+
+static gchar *
+remove_facebook_suffix (const gchar *str)
+{
+  if (!g_str_has_suffix (str, FACEBOOK_SUFFIX))
+    return g_strdup (str);
+
+  return g_strndup (str, strlen (str) - strlen (FACEBOOK_SUFFIX));
+}
+
+static void
+setup_facebook_id_widget (EmpathyAccountWidget *self,
+    GtkWidget *widget)
+{
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+  const gchar *str = NULL;
+
+  g_object_set_data_full (G_OBJECT (widget), "param_name",
+      g_strdup ("account"), g_free);
+
+  str = empathy_account_settings_get_string (priv->settings, "account");
+  if (str != NULL)
+    {
+      gchar *tmp;
+
+      tmp = remove_facebook_suffix (str);
+      gtk_entry_set_text (GTK_ENTRY (widget), tmp);
+      g_free (tmp);
+    }
+
+  priv->param_account_widget = widget;
+
+  g_signal_connect (widget, "changed",
+      G_CALLBACK (facebook_id_widget_changed_cb), self);
+}
+
 static void
 account_widget_build_jabber (EmpathyAccountWidget *self,
     const char *filename)
@@ -949,13 +1021,17 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
   GtkWidget *checkbutton_ssl;
   GtkWidget *label_id, *label_password;
   GtkWidget *label_id_create, *label_password_create;
-  GtkWidget *label_example_gtalk, *label_example_jabber;
-  gboolean is_gtalk;
+  GtkWidget *label_example_gtalk, *label_example_jabber, *label_example_fb;
+  gboolean is_gtalk, is_facebook;
+  GtkWidget *expander_advanced;
+  GtkWidget *entry_id;
 
   is_gtalk = account_widget_is_gtalk (self);
+  is_facebook = account_widget_is_facebook (self);
 
-  if (priv->simple && !is_gtalk)
+  if (priv->simple && !is_gtalk && !is_facebook)
     {
+      /* Simple widget for XMPP */
       self->ui_details->gui = empathy_builder_get_file (filename,
           "vbox_jabber_simple", &self->ui_details->widget,
           "label_id_simple", &label_id,
@@ -981,6 +1057,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
     }
   else if (priv->simple && is_gtalk)
     {
+      /* Simple widget for Google Talk */
       self->ui_details->gui = empathy_builder_get_file (filename,
           "vbox_gtalk_simple", &self->ui_details->widget,
           NULL);
@@ -992,8 +1069,25 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
 
       self->ui_details->default_focus = g_strdup ("entry_id_g_simple");
     }
+  else if (priv->simple && is_facebook)
+    {
+      /* Simple widget for Facebook */
+      self->ui_details->gui = empathy_builder_get_file (filename,
+          "vbox_fb_simple", &self->ui_details->widget,
+          "entry_id_fb_simple", &entry_id,
+          NULL);
+
+      empathy_account_widget_handle_params (self,
+          "entry_password_fb_simple", "password",
+          NULL);
+
+      setup_facebook_id_widget (self, entry_id);
+
+      self->ui_details->default_focus = g_strdup ("entry_id_fb_simple");
+    }
   else
     {
+      /* Full widget for XMPP, Google Talk and Facebook*/
       self->ui_details->gui = empathy_builder_get_file (filename,
           "table_common_settings", &priv->table_common_settings,
           "vbox_jabber_settings", &self->ui_details->widget,
@@ -1001,10 +1095,12 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
           "checkbutton_ssl", &checkbutton_ssl,
           "label_username_example", &label_example_jabber,
           "label_username_g_example", &label_example_gtalk,
+          "label_username_f_example", &label_example_fb,
+          "expander_advanced", &expander_advanced,
+          "entry_id", &entry_id,
           NULL);
 
       empathy_account_widget_handle_params (self,
-          "entry_id", "account",
           "entry_password", "password",
           "entry_resource", "resource",
           "entry_server", "server",
@@ -1015,6 +1111,17 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
           "checkbutton_encryption", "require-encryption",
           NULL);
 
+      if (is_facebook)
+        {
+          /* Facebook special case the entry ID widget to hide the
+           * "@chat.facebook.com" part */
+          setup_facebook_id_widget (self, entry_id);
+        }
+      else
+        {
+          empathy_account_widget_setup_widget (self, entry_id, "account");
+        }
+
       self->ui_details->default_focus = g_strdup ("entry_id");
       self->ui_details->add_forget = TRUE;
       priv->spinbutton_port = spinbutton_port;
@@ -1028,6 +1135,12 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
           gtk_widget_hide (label_example_jabber);
           gtk_widget_show (label_example_gtalk);
         }
+      else if (is_facebook)
+        {
+          gtk_widget_hide (label_example_jabber);
+          gtk_widget_show (label_example_fb);
+          gtk_widget_hide (expander_advanced);
+        }
     }
 }
 
@@ -1462,7 +1575,7 @@ add_register_buttons (EmpathyAccountWidget *self,
   if (!tp_connection_manager_protocol_can_register (protocol))
     return;
 
-  if (account_widget_is_gtalk (self))
+  if (account_widget_is_gtalk (self) || account_widget_is_facebook (self))
     return;
 
   if (priv->simple)
@@ -1858,6 +1971,14 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
           default_display_name = g_strdup_printf (_("%1$s on %2$s"),
               login_id, server);
         }
+      else if (account_widget_is_facebook (self))
+        {
+          gchar *tmp;
+
+          tmp = remove_facebook_suffix (login_id);
+          default_display_name = g_strdup_printf ("Facebook (%s)", tmp);
+          g_free (tmp);
+        }
       else
         {
           default_display_name = g_strdup (login_id);
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 86f6af5..72eb055 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -78,6 +78,7 @@ enum
   COL_CM,
   COL_PROTOCOL_NAME,
   COL_IS_GTALK,
+  COL_IS_FACEBOOK,
   COL_COUNT
 };
 
@@ -130,12 +131,16 @@ protocol_chooser_sort_func (GtkTreeModel *model,
        * non-gtalk */
       if (cmp == 0)
         {
-          gboolean is_gtalk;
+          gboolean is_gtalk, is_facebook;
           gtk_tree_model_get (model, iter_a,
             COL_IS_GTALK, &is_gtalk,
+            COL_IS_FACEBOOK, &is_facebook,
             -1);
 
-          cmp = is_gtalk ? 1 : -1;
+          if (is_gtalk || is_facebook)
+            cmp = 1;
+          else
+            cmp = -1;
         }
     }
 
@@ -167,6 +172,12 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
          */
         continue;
 
+      if (!tp_strdiff (cm->name, "haze") &&
+          !tp_strdiff (proto->name, "facebook"))
+        /* Facebook now supports XMPP so drop the purple facebook plugin; user
+         * should use Gabble */
+        continue;
+
       if (tp_strdiff (cm->name, "haze") && !tp_strdiff (saved_cm_name, "haze"))
         {
           GtkTreeIter titer;
@@ -220,6 +231,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
           COL_CM, cm,
           COL_PROTOCOL_NAME, proto->name,
           COL_IS_GTALK, FALSE,
+          COL_IS_FACEBOOK, FALSE,
           -1);
 
       if (!tp_strdiff (proto->name, "jabber") &&
@@ -233,6 +245,18 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser,
              COL_CM, cm,
              COL_PROTOCOL_NAME, proto->name,
              COL_IS_GTALK, TRUE,
+             COL_IS_FACEBOOK, FALSE,
+             -1);
+
+          display_name = empathy_protocol_name_to_display_name ("facebook");
+          gtk_list_store_insert_with_values (priv->store,
+             NULL, 0,
+             COL_ICON, "im-facebook",
+             COL_LABEL, display_name,
+             COL_CM, cm,
+             COL_PROTOCOL_NAME, proto->name,
+             COL_IS_GTALK, FALSE,
+             COL_IS_FACEBOOK, TRUE,
              -1);
         }
 
@@ -283,7 +307,8 @@ protocol_chooser_constructed (GObject *object)
           G_TYPE_STRING,    /* Label     */
           G_TYPE_OBJECT,    /* CM */
           G_TYPE_STRING,    /* protocol name  */
-          G_TYPE_BOOLEAN);  /* is gtalk  */
+          G_TYPE_BOOLEAN,   /* is gtalk  */
+          G_TYPE_BOOLEAN);  /* is facebook  */
 
   /* Set the protocol sort function */
   gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (priv->store),
@@ -396,12 +421,13 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
   TpConnectionManager *cm = NULL;
   gchar *protocol_name = NULL;
   gboolean visible = FALSE;
-  gboolean is_gtalk;
+  gboolean is_gtalk, is_facebook;
 
   gtk_tree_model_get (model, iter,
       COL_CM, &cm,
       COL_PROTOCOL_NAME, &protocol_name,
       COL_IS_GTALK, &is_gtalk,
+      COL_IS_FACEBOOK, &is_facebook,
       -1);
 
   if (cm != NULL && protocol_name != NULL)
@@ -413,7 +439,7 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
 
       if (protocol != NULL)
         {
-          visible = priv->filter_func (cm, protocol, is_gtalk,
+          visible = priv->filter_func (cm, protocol, is_gtalk, is_facebook,
               priv->filter_user_data);
         }
     }
@@ -439,7 +465,8 @@ TpConnectionManager *
 empathy_protocol_chooser_dup_selected (
     EmpathyProtocolChooser *protocol_chooser,
     TpConnectionManagerProtocol **protocol,
-    gboolean *is_gtalk)
+    gboolean *is_gtalk,
+    gboolean *is_facebook)
 {
   GtkTreeIter iter;
   TpConnectionManager *cm = NULL;
@@ -478,6 +505,13 @@ empathy_protocol_chooser_dup_selected (
               COL_IS_GTALK, is_gtalk,
               -1);
         }
+
+      if (is_facebook != NULL)
+        {
+          gtk_tree_model_get (GTK_TREE_MODEL (cur_model), &iter,
+              COL_IS_FACEBOOK, is_facebook,
+              -1);
+        }
     }
 
   return cm;
diff --git a/libempathy-gtk/empathy-protocol-chooser.h b/libempathy-gtk/empathy-protocol-chooser.h
index 088d1b6..88b23cb 100644
--- a/libempathy-gtk/empathy-protocol-chooser.h
+++ b/libempathy-gtk/empathy-protocol-chooser.h
@@ -61,6 +61,7 @@ struct _EmpathyProtocolChooserClass
 typedef gboolean (*EmpathyProtocolChooserFilterFunc) (TpConnectionManager *cm,
     TpConnectionManagerProtocol *protocol,
     gboolean is_gtalk,
+    gboolean is_facebook,
     gpointer user_data);
 
 GType empathy_protocol_chooser_get_type (void) G_GNUC_CONST;
@@ -68,7 +69,8 @@ GtkWidget * empathy_protocol_chooser_new (void);
 TpConnectionManager *empathy_protocol_chooser_dup_selected (
     EmpathyProtocolChooser *protocol_chooser,
     TpConnectionManagerProtocol **protocol,
-    gboolean *is_gtalk);
+    gboolean *is_gtalk,
+    gboolean *is_facebook);
 
 void empathy_protocol_chooser_set_visible (
     EmpathyProtocolChooser *protocol_chooser,
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 58ff1aa..f3cfc1f 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -390,28 +390,38 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
   char *str;
   GtkWidget *account_widget;
   EmpathyAccountWidget *widget_object = NULL;
-  gboolean is_gtalk;
+  gboolean is_gtalk, is_facebook;
+  const gchar *name;
 
   priv = GET_PRIV (self);
 
   cm = empathy_protocol_chooser_dup_selected (
-      EMPATHY_PROTOCOL_CHOOSER (chooser), &proto, &is_gtalk);
+      EMPATHY_PROTOCOL_CHOOSER (chooser), &proto, &is_gtalk, &is_facebook);
 
   if (cm == NULL || proto == NULL)
     /* we are not ready yet */
     return;
 
   /* Create account */
+  if (is_gtalk)
+    name = "gtalk";
+  else if (is_facebook)
+    name = "facebook";
+  else
+    name = proto->name;
+
   /* To translator: %s is the protocol name */
   str = g_strdup_printf (_("New %s account"),
-      empathy_protocol_name_to_display_name (
-          is_gtalk ? "gtalk" : proto->name));
+      empathy_protocol_name_to_display_name (name));
 
   settings = empathy_account_settings_new (cm->name, proto->name, str);
 
   if (is_gtalk)
     empathy_account_settings_set_icon_name_async (settings, "im-google-talk",
       NULL, NULL);
+  else if (is_facebook)
+    empathy_account_settings_set_icon_name_async (settings, "im-facebook",
+      NULL, NULL);
 
   if (priv->first_resp == RESPONSE_CREATE_ACCOUNT)
     empathy_account_settings_set_boolean (settings, "register", TRUE);
@@ -449,6 +459,7 @@ account_assistant_chooser_enter_details_filter_func (
     TpConnectionManager *cm,
     TpConnectionManagerProtocol *protocol,
     gboolean is_gtalk,
+    gboolean is_facebook,
     gpointer user_data)
 {
   if (!tp_strdiff (protocol->name, "local-xmpp") ||
@@ -463,9 +474,10 @@ account_assistant_chooser_create_account_filter_func (
     TpConnectionManager *cm,
     TpConnectionManagerProtocol *protocol,
     gboolean is_gtalk,
+    gboolean is_facebook,
     gpointer user_data)
 {
-  if (is_gtalk)
+  if (is_gtalk || is_facebook)
     return FALSE;
 
   return tp_connection_manager_protocol_can_register (protocol);
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 4c8ed13..39e20d8 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -530,19 +530,25 @@ accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog)
   EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
   EmpathyAccountSettings *settings;
   gchar *str;
-  const gchar *display_name;
+  const gchar *name, *display_name;
   TpConnectionManager *cm;
   TpConnectionManagerProtocol *proto;
-  gboolean is_gtalk;
+  gboolean is_gtalk, is_facebook;
 
   cm = empathy_protocol_chooser_dup_selected (
-      EMPATHY_PROTOCOL_CHOOSER (priv->combobox_protocol), &proto, &is_gtalk);
+      EMPATHY_PROTOCOL_CHOOSER (priv->combobox_protocol), &proto, &is_gtalk,
+      &is_facebook);
   if (cm == NULL)
     return;
 
-  display_name = empathy_protocol_name_to_display_name (
-      is_gtalk ? "gtalk" : proto->name);
+  if (is_gtalk)
+    name = "gtalk";
+  else if (is_facebook)
+    name ="facebook";
+  else
+    name = proto->name;
 
+  display_name = empathy_protocol_name_to_display_name (name);
   if (display_name == NULL)
     display_name = proto->name;
 
@@ -558,6 +564,9 @@ accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog)
   if (is_gtalk)
     empathy_account_settings_set_icon_name_async (settings, "im-google-talk",
         NULL, NULL);
+  else if (is_facebook)
+    empathy_account_settings_set_icon_name_async (settings, "im-facebook",
+        NULL, NULL);
 
   accounts_dialog_add (dialog, settings);
   accounts_dialog_model_set_selected (dialog, settings);
