facebook twitter hatena line email

Twitter/api/users/show

提供: 初心者エンジニアの簡易メモ
2015年11月6日 (金) 06:49時点におけるAdmin (トーク | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

使えそうなデータ

[protected] => 公開非公開
[followers_count] => フォロワー数
[friends_count] => フォロー数
[statuses_count] => ツイート数
[favourites_count] => お気に入り件数
[description] => 補足文
[lang] => 言語(en | ja)

twitterのusers/showについてのサンプルデータ

(screen_name=google)

stdClass Object
(
   [id] => 20536157
   [id_str] => 20536157
   [name] => Google
   [screen_name] => google
   [location] => Mountain View, CA
   [profile_location] => 
   [description] => News and updates from Google
   [url] => http://t.co/twxHxOtTvy
   [entities] => stdClass Object
       (
           [url] => stdClass Object
               (
                   [urls] => Array
                       (
                           [0] => stdClass Object
                               (
                                   [url] => http://t.co/twxHxOtTvy
                                   [expanded_url] => http://www.google.com
                                   [display_url] => google.com
                                   [indices] => Array
                                       (
                                           [0] => 0
                                           [1] => 22
                                       )
                               )
                       )
               )
           [description] => stdClass Object
               (
                   [urls] => Array
                       (
                       )
               )
       )
   [protected] => 
   [followers_count] => 12958010
   [friends_count] => 439
   [listed_count] => 91687
   [created_at] => Tue Feb 10 19:14:39 +0000 2009
   [favourites_count] => 407
   [utc_offset] => -28800
   [time_zone] => Pacific Time (US & Canada)
   [geo_enabled] => 1
   [verified] => 1
   [statuses_count] => 7746
   [lang] => en
   [status] => stdClass Object
       (
           [created_at] => Tue Nov 03 00:44:19 +0000 2015
           [id] => 661343110413307905
           [id_str] => 661343110413307905
           [text] => @MarioMaster6441 You're welcome. Give us a shout if you have any questions in the future.
           [source] => <a href="http://www.conversocial.com" rel="nofollow">Conversocial</a>
           [truncated] => 
           [in_reply_to_status_id] => 661334764800995328
           [in_reply_to_status_id_str] => 661334764800995328
           [in_reply_to_user_id] => 1966738692
           [in_reply_to_user_id_str] => 1966738692
           [in_reply_to_screen_name] => MarioMaster6441
           [geo] => 
           [coordinates] => 
           [place] => 
           [contributors] => 
           [retweet_count] => 4
           [favorite_count] => 4
           [entities] => stdClass Object
               (
                   [hashtags] => Array
                       (
                       )
                   [symbols] => Array
                       (
                       )
                   [user_mentions] => Array
                       (
                           [0] => stdClass Object
                               (
                                   [screen_name] => MarioMaster6441
                                   [name] => Jason
                                   [id] => 1966738692
                                   [id_str] => 1966738692
                                   [indices] => Array
                                       (
                                           [0] => 0
                                           [1] => 16
                                       )
                               )
                       )
                   [urls] => Array
                       (
                       )
               )
           [favorited] => 
           [retweeted] => 
           [lang] => en
       )
   [contributors_enabled] => 
   [is_translator] => 
   [is_translation_enabled] => 
   [profile_background_color] => FFFFFF
   [profile_background_image_url] => http://pbs.twimg.com/profile_background_images/378800000163714586/yY9JMq3S.png
   [profile_background_image_url_https] => https://pbs.twimg.com/profile_background_images/378800000163714586/yY9JMq3S.png
   [profile_background_tile] => 1
   [profile_image_url] => http://pbs.twimg.com/profile_images/638751551457103872/KN-NzuRl_normal.png
   [profile_image_url_https] => https://pbs.twimg.com/profile_images/638751551457103872/KN-NzuRl_normal.png
   [profile_banner_url] => https://pbs.twimg.com/profile_banners/20536157/1441222905
   [profile_link_color] => 0000CC
   [profile_sidebar_border_color] => FFFFFF
   [profile_sidebar_fill_color] => EBEFF9
   [profile_text_color] => 000000
   [profile_use_background_image] => 1
   [has_extended_profile] => 
   [default_profile] => 
   [default_profile_image] => 
   [following] => 1
   [follow_request_sent] => 
   [notifications] => 
)

存在しないページだった場合

stdClass Object
(
   [errors] => Array
       (
           [0] => stdClass Object
               (
                   [code] => 34
                   [message] => Sorry, that page does not exist.
               )
       )
)

twitter公式apiページ(user/show)

https://dev.twitter.com/rest/reference/get/users/show