39
40

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.

[Twitter]アイコン画像URLをサイズ別に取得する

Posted at

まず、RESTAPIかなにかでアイコン画像URLを取得する
TwitterRESTAPIのアカウント情報取得
https://dev.twitter.com/docs/api/1.1/get/users/show

上記リンク先のExample Requestの戻り値6行目に
"profile_image_url": "http://a0.twimg.com/profile_images/1777569006/image1327396628_normal.png”
となってるので、こいつを例に。

↑のリンクの末尾、_nomalを書き換えることで画像の大きさを変更できる

もっと小さくしたい場合→_mini
http://a0.twimg.com/profile_images/1777569006/image1327396628_mini.png

もっと大きくしたい場合→ _bigger
http://a0.twimg.com/profile_images/1777569006/image1327396628_bigger.png

さらに大きくしたい場合→_以降無し
http://a0.twimg.com/profile_images/1777569006/image1327396628.png

Webサービスやアプリつくるときは基本最後のやつから画像取得してます。

Facebookはこちら
http://qiita.com/stkn_bb/items/b0496b2e0e54efc0e9f5

39
40
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
39
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?