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(); } }
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(); } } }
public void TweetWithScreenshot(string msg) { if (isInvoking) { return; } Debug.Log("TweetWithScreenshot"); this.logInType = TwitterLoginType.ToukouWithImage; message = msg; isInvoking = true; if (IsAuthenticated) { StartCoroutine(PostScreenshot()); } else { AndroidTwitterManager.Instance.AuthenticateUser(); } }