1
5

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.

Tweepy で Twitter に画像付きのツイートをする

Posted at

sample.png という画像付きの投稿をします。

send_picture.py
#! /usr/bin/python
#
#	send_picture.py
#
#						Nov/28/2018
# ------------------------------------------------------------------
import sys
import tweepy
from key_tweepy import key_tweepy_proc

sys.stderr.write("*** 開始 ***\n")


api = key_tweepy_proc()

message = ""
message += "投稿のテスト\n"
message += "2018年11月28日 午後7時50分\n"
#
#
#api.update_status(message)
api.update_with_media(filename='./sample.png',status=message)
#
sys.stderr.write("*** 終了 ***\n")
# ------------------------------------------------------------------

key_tweepy.py はこちらと同じです。
Tweepy で Twitter の単語を検索する

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?