LoginSignup
13
11

More than 5 years have passed since last update.

Twitterでズンドコキヨシ

Last updated at Posted at 2016-03-27

お前タイムラインどうでもいいツイートで埋めんなってそれ一番言われてるから

<?php

// https://github.com/mpyw/TwistOAuth
require 'TwistOAuth.phar';

$to = new TwistOAuth(
    'XXXXXXXX',
    'XXXXXXXX',
    'XXXXXXXX',
    'XXXXXXXX'
);
$prefix = '@tos ';
$id = null;
$sum_zun = $is_zun = 0;
$choices = ['ドコ', 'ズン'];

do {
    $sum_zun = $is_zun ? $sum_zun + 1 : 0;
    $is_zun = mt_rand(0, 1);
    $id = $to->post('statuses/update', [
        'status' => "{$prefix}{$choices[$is_zun]}",
        'in_reply_to_status_id' => $id,
    ])->id_str;
} while ($sum_zun < 4 || $is_zun);
$to->post('statuses/update', [
    'status' => "{$prefix}キ・ヨ・シ!",
    'in_reply_to_status_id' => $id,
]);

参考: ツイッターで同じ本文のツイートをし続ける

スクリーンショット 2016-03-28 1.03.31.png

13
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11