aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r--qt-ui/simplewidgets.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 6263e5521..76400ef41 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -661,49 +661,3 @@ void MultiFilter::closeFilter()
MultiFilterSortModel::instance()->clearFilter();
hide();
}
-
-FacebookManager::FacebookManager()
-{
-}
-
-bool FacebookManager::checkAlbumExists()
-{
- QUrl albumListUrl("https://graph.facebook.com/me/albums?access_token=" + QString(prefs.facebook.access_token));
- QNetworkAccessManager *manager = new QNetworkAccessManager();
- QNetworkReply *reply = manager->get(QNetworkRequest(albumListUrl));
-
- // Make this method synchronous.
- QEventLoop loop;
- connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
- loop.exec();
-
- QJsonDocument albumsDoc = QJsonDocument::fromJson(reply->readAll());
- QJsonArray albumObj = albumsDoc.object().value("data").toArray();
- foreach(const QJsonValue &v, albumObj){
- QJsonObject obj = v.toObject();
- if (obj.value("name").toString() == QString(prefs.facebook.album_name)) {
- qDebug() << "Album already exists. Try to get the ID in the next commit.";
- return false;
- }
- }
-
- qDebug() << "Album doesn't exists, let's create it.";
- QUrlQuery params;
- params.addQueryItem("name", prefs.facebook.album_name );
- params.addQueryItem("description", "Subsurface Album");
- params.addQueryItem("privacy", "{'value': 'SELF'}");
-
- QNetworkRequest request(albumListUrl);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/octet-stream");
- reply = manager->post(request, params.query().toLocal8Bit());
- connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
- loop.exec();
-
- qDebug() << reply->readAll();
-
-}
-
-void FacebookManager::createAlbum()
-{
-
-}