AuthApp::AuthApp(QWidget *parent) : QMainWindow(parent), ui(new Ui::AuthAppClass) { ui->setupUi(this); //iFBSession = FBSession::sessionForApplication("df51def3e750a350ddb961a70b5ab5ab", "3b86a756f77967dea4674f080fa5d345", QString()); //iFBSession = FBSession::sessionForApplication("114354298600019", "fb10f1c758fc285b2a6113344ef4c893", QString()); //Facebook keys //iFBSession = FBSession::sessionForApplication("697207f5f3610334e02d828450e66589", "520edd7afff9b79f", QString()); //Flickr Mobile Based //iFBSession = FBSession::sessionForApplication("2d03ca48309291ee6815410c3a5bb278", "1bb754981c7c6974", QString()); //Flickr Web based iFBSession = FBSession::sessionForApplication(kApiKey,kApiSecret, QString()); //Flickr Web based connect (iFBSession, SIGNAL(sessionDidLogout()), this, SLOT(sessionDidLogout())); connect (iFBSession,SIGNAL(sessionDidLogin(QString)), this, SLOT(sessionDidLogin(QString))); //CheckforLogin(); }
bool FBSession::resume() { FBUID uid = iSettings.value("FBUserId", 0 ).toULongLong(); if (uid) { QDateTime currentDateTime = QDateTime::currentDateTime(); QDateTime expirationDate; if (iSettings.contains("FBSessionExpires")) expirationDate = iSettings.value( "FBSessionExpires").toDateTime(); if ((expirationDate.isValid() && expirationDate > currentDateTime) || expirationDate.toTime_t() == 0 ) { iUid = uid; iSessionKey = iSettings.value("FBSessionKey").toString(); iSessionSecret = iSettings.value("FBSessionSecret").toString(); iExpirationDate = expirationDate; emit sessionDidLogin( iUid ); return true; } } return false; }
int FBSession::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: sessionDidLogin((*reinterpret_cast< FBUID(*)>(_a[1]))); break; case 1: sessionDidNotLogin(); break; case 2: sessionWillLogout((*reinterpret_cast< FBUID(*)>(_a[1]))); break; case 3: sessionDidLogout(); break; case 4: requestTimerReady(); break; default: ; } _id -= 5; } return _id; }
int FBConnect::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: start(); break; case 1: stop(); break; case 2: sessionDidLogin((*reinterpret_cast< FBUID(*)>(_a[1]))); break; case 3: getFriendList(); break; case 4: getNewsFeed(); break; case 5: getAlbums((*reinterpret_cast< QString(*)>(_a[1]))); break; case 6: getOwnAlbums(); break; case 7: getComments((*reinterpret_cast< QString(*)>(_a[1]))); break; case 8: getPhotos((*reinterpret_cast< QString(*)>(_a[1]))); break; case 9: updateStatus((*reinterpret_cast< QString(*)>(_a[1]))); break; case 10: sendComment((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 11: test((*reinterpret_cast< const FBError(*)>(_a[1]))); break; case 12: update(); break; case 13: logout(); break; case 14: friendRequestDidLoad((*reinterpret_cast< const QVariant(*)>(_a[1]))); break; case 15: newsFeedRequestDidLoad((*reinterpret_cast< const QVariant(*)>(_a[1]))); break; case 16: albumRequestDidLoad((*reinterpret_cast< const QVariant(*)>(_a[1]))); break; case 17: photosRequestDidLoad((*reinterpret_cast< const QVariant(*)>(_a[1]))); break; case 18: commentRequestDidLoad((*reinterpret_cast< const QVariant(*)>(_a[1]))); break; case 19: sessionDidLogout(); break; case 20: gotPermissions(); break; case 21: { bool _r = getName(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; default: ; } _id -= 22; } return _id; }