示例#1
0
    public void Follow()
    {
        if (isInvoking)
        {
            return;
        }
        isInvoking = true;

        if (PS_Plugin.Instance.isDebugMode && isDebugLog)
        {
            Debug.Log("Follow");
        }
        this.logInType = TwitterLoginType.Follow;

        if (IsAuthenticated)
        {
            if (PS_Plugin.Instance.isDebugMode && isDebugLog)
            {
                Debug.Log("ログイン済みのためチェックする");
            }
            TW_FollowersIdsRequest r = TW_FollowersIdsRequest.Create();
            r.ActionComplete += OnIdsLoaded;
            r.AddParam("screen_name", followPageName);

            r.Send();
        }
        else
        {
            if (PS_Plugin.Instance.isDebugMode && isDebugLog)
            {
                Debug.Log("ログインしていないのでログインを");
            }
            AndroidTwitterManager.Instance.AuthenticateUser();
        }
    }
示例#2
0
    public void FollowersidsRequest()
    {
        TW_FollowersIdsRequest r = TW_FollowersIdsRequest.Create();

        r.ActionComplete += OnIdsLoaded;
        r.AddParam("screen_name", "unity3d");
        r.Send();
    }
    private void FollowersidsRequest()
    {
        TW_FollowersIdsRequest r = TW_FollowersIdsRequest.Create();

        r.addEventListener(BaseEvent.COMPLETE, OnIdsLoaded);
        r.AddParam("screen_name", "unity3d");
        r.Send();
    }
示例#4
0
    void OnAuthCompleteAction(TWResult result)
    {
        if (result.IsSucceeded)
        {
            //user authed
            IsAuthenticated = true;

            string AccessToken       = AndroidTwitterManager.Instance.AccessToken;
            string AccessTokenSecret = AndroidTwitterManager.Instance.AccessTokenSecret;
            if (PS_Plugin.Instance.isDebugMode && isDebugLog)
            {
                Debug.Log("Twiitterへのログインが完了!");
            }
            if (TwitterApplicationOnlyToken.Instance.currentToken == null)
            {
                Debug.LogError("TwitterApplicationOnlyToken.Instance.currentToken is null");
            }

            if (logInType == TwitterLoginType.ToukouWithImage)
            {
                if (PS_Plugin.Instance.isDebugMode && isDebugLog)
                {
                    Debug.Log("ログインしたので投稿する");
                }
                this.logInType = TwitterLoginType.ToukouWithImage;

                StartCoroutine(PostScreenshot());
                return;
            }
            else if (logInType == TwitterLoginType.Follow)
            {
                if (PS_Plugin.Instance.isDebugMode && isDebugLog)
                {
                    Debug.Log("ログインしたのでチェックフォロー");
                }
                TW_FollowersIdsRequest r = TW_FollowersIdsRequest.Create();
                r.ActionComplete += OnIdsLoaded;
                r.AddParam("screen_name", followPageName);
                r.Send();
            }
        }
    }