From 1b8169036fcafc7d7d72548adebfafeb7f65e3de Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 23 Dec 2014 17:51:45 -0200 Subject: Allow subsurface to login with facebook. This piece of code allows subsurface to login with facebook using the 'Subsurface' app created within facebook for secure reasons. I'm the admin of it currently - but I'll pass it to Dirk as well. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/preferences.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qt-ui/preferences.cpp') diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index 5f7825c98..7f288ab1f 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -7,6 +7,7 @@ #include #include #include +#include PreferencesDialog *PreferencesDialog::instance() { @@ -25,6 +26,14 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Qt::WindowFlags f) : QDial ui.proxyType->addItem(tr("HTTP proxy"), QNetworkProxy::HttpProxy); ui.proxyType->addItem(tr("SOCKS proxy"), QNetworkProxy::Socks5Proxy); ui.proxyType->setCurrentIndex(-1); + + // Facebook stuff: + QUrl urlLogin("https://www.facebook.com/dialog/oauth?" + "client_id=427722490709000" + "&redirect_uri=http://www.facebook.com/connect/login_success.html"); + + ui.facebookWebView->setUrl(urlLogin); + connect(ui.proxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(proxyType_changed(int))); connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *))); connect(ui.gflow, SIGNAL(valueChanged(int)), this, SLOT(gflowChanged(int))); -- cgit v1.2.3-70-g09d2