1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TwurlでTwitterに動画付きツイートをする際の注意点

1
Last updated at Posted at 2020-05-13

公式のチュートリアルを読んでもGifアニメ付きツイートができなかったメモ。

環境

  • CPU: Intel
  • Ubuntu 18.04 (amd64)
  • ruby 2.5.1p57

前提

TwurlはTwitter公式のツールで、Railsで動きます。今回は以下の状況の対象にしています。

症状

  • 前出の公式チュートリアル(メディアのアップロード)通りに以下のコマンドを実行した際、テキストのみツイートされる。動画が添付されない。

失敗したコマンド

terminal
twurl "/1.1/statuses/update.json" -d "media_ids= 931263015239933952&text=Sample Tweet with media_ids and twurl"

対処

修正点

  • media_ids=の後ろの半角スペースを外す。
  • テキスト部分のtext=status=に変更する。

留意点

  • media_idsに与えるのは、media_id_stringの値であってmedia_idの値ではない(これは公式にも書いてある)。
  • media_idsstatusの順番は前後入れ替えても動いた。

修正後のコマンド

terminal
twurl "/1.1/statuses/update.json" -d "media_ids=931263015239933952&status=Sample Tweet with media_ids and twurl" 

これに気付かずに丸々3日無駄にしました… というかTwitterさんチュートリアル更新してください

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?