My Project
|
Manager for facebooks. More...
#include <FacebookManager.h>
Public Member Functions | |
bool | IsEnabled () |
Query if this object is enabled. | |
std::string | RequestData (const std::string &action, std::map< std::string, std::string > &requestMap, std::string &errorMessage, SallyAPI::Network::NETWORK_RETURN &errorCode) |
Request data. | |
bool | SendData (const std::string &action, std::map< std::string, std::string > &requestMap) |
Send data. | |
bool | SendStatusMessage (const std::string &explicidAppName, const std::string &appName, const std::string &message, const std::string &action, const std::string &actionName) |
Send status message. | |
void | SendUpdateToRegistedNotifier () |
Send update to registed notifier. | |
void | RegisterStatusUpdateNotifier (SallyAPI::GUI::CGUIBaseObject *window) |
Register status update notifier. | |
bool | UpdateFacebookUserInfo () |
Updates a facebook user information. | |
std::string | GetFacebookUserName () |
Gets the facebook user name. | |
std::string | GetFacebookUserId () |
Gets the facebook user identifier. | |
std::string | GetSallyKey () |
Gets the sally key. | |
std::string | GetFacebookAccessToken () |
Gets the facebook access token. | |
void | SetFacebookUserName (const std::string &userName) |
Sets a user name. | |
void | Disable () |
Disables this object. | |
void | Enable (const std::string &accessToken, const std::string &userName, const std::string &userId) |
Enables. | |
bool | ActivateFacebook () |
Activates a facebook. | |
void | ConnectFacebook () |
Connects the facebook. Requests a token from Facebook. | |
void | ShowErrorMessage (SallyAPI::GUI::CGUIBaseObject *mainWindow) |
Shows the a popup error message. Is called when the facebook connect is not working anymore. | |
bool | PostMessageToWall (const std::string &message, const std::string &description, const std::string &link, const std::string &image, std::string &errorMessage) |
Post message to wall. | |
bool | GetWall (std::string &dataResponse, std::string &errorMessage, SallyAPI::Network::NETWORK_RETURN &errorCode) |
Gets the messages from the wall of the logged in facebook user. | |
bool | GetNews (std::string &dataResponse, std::string &errorMessage, SallyAPI::Network::NETWORK_RETURN &errorCode) |
int | GetFacebookUserImageId (const std::string &userId) |
void | DownloadFacebookUserImage (const std::string &imageFolder, const std::string &userId) |
Downloads a facebook user image. | |
bool | ReloadAllFacebookUserImages () |
bool | LoadFacebookUserImage (const std::string &userId) |
Loads a facebook user image. | |
Static Public Member Functions | |
static SallyAPI::Facebook::CFacebookManager * | GetInstance () |
Gets the instance. | |
static void | DeleteInstance () |
Deletes an instance. |
Manager for facebooks.
bool CFacebookManager::ActivateFacebook | ( | ) |
Activates a facebook.
void CFacebookManager::ConnectFacebook | ( | ) |
Connects the facebook. Requests a token from Facebook.
void CFacebookManager::DeleteInstance | ( | ) | [static] |
Deletes an instance.
void CFacebookManager::Disable | ( | ) |
Disables this object.
void CFacebookManager::DownloadFacebookUserImage | ( | const std::string & | imageFolder, |
const std::string & | userId | ||
) |
Downloads a facebook user image.
imageFolder | Pathname of the image folder. |
userId | Identifier for the user. |
void CFacebookManager::Enable | ( | const std::string & | accessToken, |
const std::string & | userName, | ||
const std::string & | userId | ||
) |
Enables.
accessToken | The access token. |
userName | Name of the user. |
userId | Identifier for the user. |
sallyKey | The sally key. |
std::string CFacebookManager::GetFacebookAccessToken | ( | ) |
Gets the facebook access token.
std::string CFacebookManager::GetFacebookUserId | ( | ) |
Gets the facebook user identifier.
int CFacebookManager::GetFacebookUserImageId | ( | const std::string & | userId | ) |
std::string CFacebookManager::GetFacebookUserName | ( | ) |
Gets the facebook user name.
Gets the instance.
bool CFacebookManager::GetNews | ( | std::string & | dataResponse, |
std::string & | errorMessage, | ||
SallyAPI::Network::NETWORK_RETURN & | errorCode | ||
) |
std::string CFacebookManager::GetSallyKey | ( | ) |
Gets the sally key.
bool CFacebookManager::GetWall | ( | std::string & | dataResponse, |
std::string & | errorMessage, | ||
SallyAPI::Network::NETWORK_RETURN & | errorCode | ||
) |
Gets the messages from the wall of the logged in facebook user.
[in,out] | dataResponse | The data response. |
[in,out] | errorMessage | Message describing the error. |
[in,out] | errorCode | The error code. |
bool CFacebookManager::IsEnabled | ( | ) |
Query if this object is enabled.
bool CFacebookManager::LoadFacebookUserImage | ( | const std::string & | userId | ) |
Loads a facebook user image.
userId | Identifier for the user. |
bool CFacebookManager::PostMessageToWall | ( | const std::string & | message, |
const std::string & | description, | ||
const std::string & | link, | ||
const std::string & | image, | ||
std::string & | errorMessage | ||
) |
Post message to wall.
message | The message. | |
description | The description. | |
link | The link. | |
image | The image. | |
[in,out] | errorMessage | Message describing the error. |
Register status update notifier.
[in,out] | window | If non-null, the window. |
bool false if it fails *bool CFacebookManager::ReloadAllFacebookUserImages | ( | ) |
std::string CFacebookManager::RequestData | ( | const std::string & | action, |
std::map< std::string, std::string > & | requestMap, | ||
std::string & | errorMessage, | ||
SallyAPI::Network::NETWORK_RETURN & | errorCode | ||
) |
Request data.
action | The action. | |
[in,out] | requestMap | The request map. |
[in,out] | errorMessage | Message describing the error. |
[in,out] | errorCode | The error code. |
bool CFacebookManager::SendData | ( | const std::string & | action, |
std::map< std::string, std::string > & | requestMap | ||
) |
Send data.
action | The action. | |
[in,out] | requestMap | The request map. |
bool CFacebookManager::SendStatusMessage | ( | const std::string & | explicidAppName, |
const std::string & | appName, | ||
const std::string & | message, | ||
const std::string & | action, | ||
const std::string & | actionName | ||
) |
Send status message.
explicidAppName | Name of the explicid application. |
appName | Name of the application. |
message | The message. |
action | The action. |
actionName | Name of the action. |
Send update to registed notifier.
void CFacebookManager::SetFacebookUserName | ( | const std::string & | userName | ) |
Sets a user name.
userName | Name of the user. |
void CFacebookManager::ShowErrorMessage | ( | SallyAPI::GUI::CGUIBaseObject * | mainWindow | ) |
Shows the a popup error message. Is called when the facebook connect is not working anymore.
[in,out] | mainWindow | If non-null, the main window. |
Updates a facebook user information.