subsurface/desktop-widgets/plugins/facebook/facebook_integration.cpp
Robert C. Helling 6504cd8c46 Reenable Facebook Postings
This is what Tomaz said should be done. Thanks!

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-24 06:18:20 +09:00

43 lines
788 B
C++

#include "facebook_integration.h"
#include "facebookconnectwidget.h"
#include <QDebug>
FacebookPlugin::FacebookPlugin(QObject* parent) :
fbConnectWidget(new FacebookConnectWidget())
{
Q_UNUSED(parent)
}
bool FacebookPlugin::isConnected()
{
FacebookManager *instance = FacebookManager::instance();
return instance->loggedIn();
}
void FacebookPlugin::requestLogin()
{
fbConnectWidget->exec();
}
void FacebookPlugin::requestLogoff()
{
FacebookManager::instance()->logout();
}
QString FacebookPlugin::socialNetworkIcon() const
{
return QString();
}
QString FacebookPlugin::socialNetworkName() const
{
return tr("Facebook");
}
void FacebookPlugin::requestUpload()
{
FacebookManager *instance = FacebookManager::instance();
if (instance->loggedIn())
instance->sendDive();
}