当前位置: 首页>>代码示例>>C++>>正文


C++ EziFacebookDelegate类代码示例

本文整理汇总了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);
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:26,代码来源:EziSocialObject.cpp

示例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));
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:56,代码来源:EziSocialObject.cpp

示例3: internalAchievementCallback

void internalAchievementCallback(int responseCode, const char* responseMessage)
{
    EziFacebookDelegate* tempFBDelegate;
    tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
    
    if (tempFBDelegate)
    {
        tempFBDelegate->fbAchievementCallback(responseCode, responseMessage);
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:10,代码来源:EziSocialObject.cpp

示例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));
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:10,代码来源:EziSocialObject.cpp

示例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));
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:10,代码来源:EziSocialObject.cpp

示例6: internalUserPhotoCallback

void internalUserPhotoCallback(const char* userPhoto, const char* fbUserID)
{
    EziFacebookDelegate* tempFBDelegate;
    tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
    
    if (tempFBDelegate)
    {
        tempFBDelegate->fbUserPhotoCallback(userPhoto, fbUserID);
    }
}
开发者ID:KevinLion,项目名称:EziSocial-Plugin,代码行数:10,代码来源:EziSocialObject.cpp

示例7: internalFBPageLikeCallback

void internalFBPageLikeCallback(int responseCode)
{
    EziFacebookDelegate* tempFBDelegate;
    tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
    
    if (tempFBDelegate)
    {
        tempFBDelegate->fbPageLikeCallback(responseCode);
    }
}
开发者ID:bookatalex,项目名称:EziSocial-Plugin,代码行数:10,代码来源:EziSocialObject.cpp

示例8: internalFBHighScoreCallBack

void internalFBHighScoreCallBack(const char* data)
{
    EziFacebookDelegate* tempFBDelegate;
    tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
    
    CCLOG("HighScore = %s", data);
    
    if (tempFBDelegate)
    {
        tempFBDelegate->fbHighScoresCallback(getCustomizedArray(data));
    }
}
开发者ID:bookatalex,项目名称:EziSocial-Plugin,代码行数:12,代码来源:EziSocialObject.cpp

示例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);
    }
    
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:13,代码来源:EziSocialObject.cpp

示例10: internalFBUserDetailCallBack

void internalFBUserDetailCallBack(const char* data)
{
    EziFacebookDelegate* tempFBDelegate;
    tempFBDelegate = EziSocialObject::sharedObject()->getFacebookDelegate();
    
    //CCLOG("User Details = %s", data);
    
    if (tempFBDelegate)
    {
        tempFBDelegate->fbUserDetailCallback(getCustomizedDictionary(data));
    }

}
开发者ID:bookatalex,项目名称:EziSocial-Plugin,代码行数:13,代码来源:EziSocialObject.cpp

示例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);
    }

}
开发者ID:bookatalex,项目名称:EziSocial-Plugin,代码行数:14,代码来源:EziSocialObject.cpp

示例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);
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:20,代码来源:EziSocialObject.cpp

示例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);
    }
}
开发者ID:piaopolar,项目名称:EziSocial-Plugin,代码行数:41,代码来源:EziSocialObject.cpp


注:本文中的EziFacebookDelegate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。