本文整理汇总了C++中EziFacebookDelegate类的典型用法代码示例。如果您正苦于以下问题:C++ EziFacebookDelegate类的具体用法?C++ EziFacebookDelegate怎么用?C++ EziFacebookDelegate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EziFacebookDelegate类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internalFBUserDetailCallBack
void internalFBUserDetailCallBack(int responseCode, const char* responseMessage, const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
EziFacebookUser *fbUser = NULL;
if (responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_USER_DETAIL_SUCCESS)
{
std::vector< std::string > strings = EziSocialObject::tokenizeStr(data, ";");
fbUser = new EziFacebookUser();
for (int i = 1; i < strings.size(); i += 2)
{
//CCLOG("Key = %s = %s", strings[i-1].c_str(), strings[i].c_str());
fbUser->saveData(strings[i-1].c_str(), strings[i]);
}
}
EziSocialObject::sharedObject()->setCurrentFacebookUser(fbUser);
if (tempFBDelegate)
{
tempFBDelegate->fbUserDetailCallback(responseCode, responseMessage, fbUser);
}
}
示例2: internalRequestRecieveCallback
void internalRequestRecieveCallback(int responseCode,
const char* requestID,
const char* message,
const char* senderID,
const char* senderName,
const char* receiverID,
const char* data,
const char* errorMessage)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_CHALLENGE_RECEIVE ||
responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_GIFT_RECEIVE ||
responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_INVITE_RECEIVE)
{
// We can mark this request ID as complete in the List.
//EziFBIncomingRequestManager::sharedManager()->requestComepleted(requestID);
EziFBIncomingRequest* incomingRequest = EziFBIncomingRequestManager::sharedManager()->getIncomingRequest(requestID);
switch (responseCode)
{
case EziSocialWrapperNS::RESPONSE_CODE::FB_CHALLENGE_RECEIVE:
incomingRequest->setRequestType(EziSocialWrapperNS::FB_REQUEST::REQUEST_CHALLENGE);
break;
case EziSocialWrapperNS::RESPONSE_CODE::FB_INVITE_RECEIVE:
incomingRequest->setRequestType(EziSocialWrapperNS::FB_REQUEST::REQUEST_INVITE);
break;
case EziSocialWrapperNS::RESPONSE_CODE::FB_GIFT_RECEIVE:
incomingRequest->setRequestType(EziSocialWrapperNS::FB_REQUEST::REQUEST_GIFT);
break;
default:
break;
}
incomingRequest->setMessage(message);
incomingRequest->setSender(senderID, senderName);
incomingRequest->setReceiverID(receiverID);
incomingRequest->setDataDictionary(getCustomizedDictionary(data));
incomingRequest->setDataFetchedFromFacebook(true);
incomingRequest->saveToUserDefaults();
EziFBIncomingRequestManager::sharedManager()->processNextRequest();
}
if (tempFBDelegate)
{
tempFBDelegate->fbRecieveRequestCallback(responseCode,
message,
senderName,
getCustomizedDictionary(data));
}
}
示例3: internalAchievementCallback
void internalAchievementCallback(int responseCode, const char* responseMessage)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
tempFBDelegate->fbAchievementCallback(responseCode, responseMessage);
}
}
示例4: internalRequestSendCallback
void internalRequestSendCallback(int responseCode, const char* responseMessage, const char* friendsGotRequestIDs)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
tempFBDelegate->fbSendRequestCallback(responseCode, responseMessage, getArrayFromString(friendsGotRequestIDs));
}
}
示例5: internalFBHighScoreCallBack
void internalFBHighScoreCallBack(int responseCode, const char* responseMessage, const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
tempFBDelegate->fbHighScoresCallback(responseCode, responseMessage, buildFriendsArray(data));
}
}
示例6: internalUserPhotoCallback
void internalUserPhotoCallback(const char* userPhoto, const char* fbUserID)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
tempFBDelegate->fbUserPhotoCallback(userPhoto, fbUserID);
}
}
示例7: internalFBPageLikeCallback
void internalFBPageLikeCallback(int responseCode)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
tempFBDelegate->fbPageLikeCallback(responseCode);
}
}
示例8: internalFBHighScoreCallBack
void internalFBHighScoreCallBack(const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
CCLOG("HighScore = %s", data);
if (tempFBDelegate)
{
tempFBDelegate->fbHighScoresCallback(getCustomizedArray(data));
}
}
示例9: internalFriendsCallback
void internalFriendsCallback(int responseCode, const char* responseMessage, const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (tempFBDelegate)
{
std::vector<EziFacebookFriend*> myFriends = buildFriendsArray(data);
//std::vector<EziFacebookFriend*> myFriends;
tempFBDelegate->fbFriendsCallback(responseCode, responseMessage, myFriends);
}
}
示例10: internalFBUserDetailCallBack
void internalFBUserDetailCallBack(const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
//CCLOG("User Details = %s", data);
if (tempFBDelegate)
{
tempFBDelegate->fbUserDetailCallback(getCustomizedDictionary(data));
}
}
示例11: internalFriendsCallback
void internalFriendsCallback(const char* data)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
CCLOG("Friend Callback = %s", data);
if (tempFBDelegate)
{
tempFBDelegate->fbFriendsCallback(getCustomizedArray(data));
//tempFBDelegate->fbFriendsCallback(friends);
}
}
示例12: internalIncomingRequestCallback
void internalIncomingRequestCallback(int responseCode, const char* requestIDs, const char* errorMessage)
{
if (strcmp(requestIDs, "") != 0 && responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_INCOMING_REQUEST_NEW)
{
EziFBIncomingRequestManager::sharedManager()->addNewIncomingRequestIDs(requestIDs);
int totalPendingRequest = EziFBIncomingRequestManager::sharedManager()->getPendingRequestCount();
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
tempFBDelegate->fbIncomingRequestCallback(responseCode, errorMessage, totalPendingRequest);
EziFBIncomingRequestManager::sharedManager()->processNextRequest();
}
else
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
tempFBDelegate->fbIncomingRequestCallback(responseCode, errorMessage, 0);
}
}
示例13: internalFBSessionCallback
void internalFBSessionCallback(int responseCode, const char* responseMessage, const char* userID)
{
EziFacebookDelegate* tempFBDelegate;
tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
if (responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_LOGIN_FIRST_NEEDS_READ_PERMISSION)
{
// Boss, this is iOS 6 issue. We fist needs the read permission.
EziSocialObject::sharedObject()->performLoginUsingFacebook(false);
return;
}
if (responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_LOGIN_SUCCESSFUL)
{
CCLOG("Fetching user details...");
EziSocialObject::sharedObject()->fetchFBUserDetails(false);
if (strcmp(userID, "") != 0)
{
std::string storedUserID = UserDefault::getInstance()->getStringForKey(KEY_EZI_CURRENT_FB_USER_ID, "");
if (storedUserID.compare(userID) != 0)
{
// This is some new ID. Let's build the list.
UserDefault::getInstance()->setStringForKey(KEY_EZI_CURRENT_FB_USER_ID, userID);
UserDefault::getInstance()->flush();
log("Rebuilding Manager...");
EziFBIncomingRequestManager::rebuildManager();
}
}
}
if (responseCode == EziSocialWrapperNS::RESPONSE_CODE::FB_LOGIN_MISSING_IOS_6_ACCOUNT)
{
// Developer needs to recall the Login method after sometimes.
}
if (tempFBDelegate)
{
tempFBDelegate->fbSessionCallback(responseCode, responseMessage);
}
}