-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
66 lines (50 loc) · 2.37 KB
/
Program.cs
File metadata and controls
66 lines (50 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using CoreTweet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Twitter_bot
{
class Program
{
static void Main(string[] args)
{
Console.OutputEncoding = Encoding.UTF8;
var rand = new Random();//出力する文字のランダム
try
{
var session = OAuth.Authorize("zsXtwOOlzPr9yr0a0lJF7cQfN", "3Xt6KSoEOOgE7s3wjmyuSmEfwUon0nDOjICZkZs10bSr5bbMsJ");//"api_key", "api_secret"が入る
Process.Start(session.AuthorizeUri.AbsoluteUri);//認証ブラウザを開く&ピンコードコピー
Console.Write("PINCODEは?");
var pincode = Console.ReadLine();//ピンコード入力
var token = OAuth.GetTokens(session, pincode);//トークン取得
Console.WriteLine(token);
while (true)
{
string[] coment = { " @spea55_main "," @0828_Syuu "," @kodamanbou0424 "," @hanakosaber "," @mueru0 "," @quarts_x77 "," @Lachryma_CRASH "," @Dr_purin410 "," @Imai_kousen "," @shade4827 ",
" @saberhanako "," @takahashi_1919 "," @Makigechan "," @ume_mikan03 "," @obgedsbzoztsn "," @Daiki_purin_M23 "," @Xx_RR13LV_xX "," @spea0626 "," @kyouju_Touma ",
" @r2y3q "," @genshi0916 "};//ツイート内容
string chose = coment[rand.Next(coment.Length)];//内容を選ぶ
DateTime dt = DateTime.Now;
Console.WriteLine("Tweet" + dt.ToString() + chose +"進捗どうですか");
try
{
token.Statuses.Update(status => dt.ToString() + chose + "進捗どうですか");
}
catch (Exception ex)
{
Console.WriteLine("Error:" + ex.Message);
}
Thread.Sleep(1000 * 60 * 60);
}
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Console.ReadKey();
}
}}