예제 #1
0
    void OnGUI()
    {
        if (Time.time % 2 < 1)
        {
            success = callBack.getResult();
        }

        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10, 5, 1300, 175), success);


        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 200, 200, 30), "LinkUserFacebookAccount"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserFacebookAccount(userName, fbAccessToken, appId, appSecret, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 200, 200, 30), "LinkUserFacebookAccountAcsTkn"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserFacebookAccount(userName, fbAccessToken, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(470, 200, 200, 30), "UpdateFacebookStatus"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.UpdateFacebookStatus(userName, status, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(680, 200, 200, 30), "LinkUserTwitterAccount"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserTwitterAccount(userName, accessToken, accessTokenSecret, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(890, 200, 200, 30), "LinkUserTwitterAccount"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserTwitterAccount(userName, accessToken, accessTokenSecret, consumerKey, consumerSecret, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 250, 200, 30), "UpdateTwitterStatus"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.UpdateTwitterStatus(userName, status, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 250, 200, 30), "LinkUserLinkedInAccount"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserLinkedInAccount(userName, linkedinAccessToken, linkedinAccessTokenSecret, linkedinApiKey, linkedinSecretKey, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(470, 250, 200, 30), "LinkUserLinkedInAccount"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.LinkUserLinkedInAccount(userName, accessToken, accessTokenSecret, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(680, 250, 200, 30), "UpdateLinkedInStatus"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.UpdateLinkedInStatus(userName, status, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(890, 250, 200, 30), "UpdateSocialStatusForAll"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.UpdateSocialStatusForAll(userName, status, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 300, 200, 30), "GetFacebookFriendsFromLinkUser"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.GetFacebookFriendsFromLinkUser(userName, callBack);
        }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 300, 200, 30), "GetFacebookFriendsFromAccessToken"))
        {
            socialService = sp.BuildSocialService();                     // Initializing Social Service.
            socialService.GetFacebookFriendsFromAccessToken(accessToken, callBack);
        }
    }
예제 #2
0
    void OnGUI()
    {
        if (Time.time % 2 < 1) {
            success = callBack.getResult();
        }

        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10,5,1300,175), success);

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 200, 200, 30), "LinkUserFacebookAccount"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserFacebookAccount(userName,fbAccessToken,appId,appSecret,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 200, 200, 30), "LinkUserFacebookAccountAcsTkn"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserFacebookAccount(userName,fbAccessToken,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(470, 200, 200, 30), "UpdateFacebookStatus"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.UpdateFacebookStatus(userName,status,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(680, 200, 200, 30), "LinkUserTwitterAccount"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserTwitterAccount(userName,accessToken,accessTokenSecret,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(890, 200, 200, 30), "LinkUserTwitterAccount"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserTwitterAccount(userName,accessToken,accessTokenSecret,consumerKey,consumerSecret,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 250, 200, 30), "UpdateTwitterStatus"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.UpdateTwitterStatus(userName,status,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 250, 200, 30), "LinkUserLinkedInAccount"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserLinkedInAccount(userName,linkedinAccessToken,linkedinAccessTokenSecret,linkedinApiKey,linkedinSecretKey,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(470, 250, 200, 30), "LinkUserLinkedInAccount"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.LinkUserLinkedInAccount(userName,accessToken,accessTokenSecret,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(680, 250, 200, 30), "UpdateLinkedInStatus"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.UpdateLinkedInStatus(userName,status,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(890, 250, 200, 30), "UpdateSocialStatusForAll"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.UpdateSocialStatusForAll(userName,status,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(50, 300, 200, 30), "GetFacebookFriendsFromLinkUser"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.GetFacebookFriendsFromLinkUser(userName,callBack);
            }

        //=======================================SOCIAL_SERVICE=======================================

        if (GUI.Button(new Rect(260, 300, 200, 30), "GetFacebookFriendsFromAccessToken"))
            {
                socialService = sp.BuildSocialService(); // Initializing Social Service.
                socialService.GetFacebookFriendsFromAccessToken(accessToken,callBack);
            }
    }