サイトのトップへ戻る

Twitter 開発者 ドキュメント日本語訳

GET statuses/mentions_timeline

認証ユーザーの最新20個のメンション(ユーザーの@screen_nameを含むツイート)を取得します。

取得されるタイムラインは、twitter.comであなたのメンションを見た時に表示されるものと同じです。

このメソッドでは最大800ツイートまで取得することができます。

タイムラインを扱う手順についてはタイムラインを処理するを参照してください。



リソースURL

https://api.twitter.com/1.1/statuses/mentions_timeline.json



リソース情報

応答形式
JSON
認証は必要ですか?
はい (user context only)
レート制限はありますか?
はい
リクエスト回数 / 15秒 window (ユーザー認証の場合)
15


パラメータ

count 任意

取得するツイート数を設定します。最大値は200です。 count値が適用されると停止中のコンテンツや削除されたコンテンツが取り除かれるので、このパラメータは取得するツイートを制限するものとして考えるのがベストです。 include_rtsを設定していなかったとしても、カウントにはリツイートも含まれます。 このAPIメソッドを使う時は常に include_rts=1 を送信することを推奨します。

since_id 任意

これに指定したIDよりも大きい(より新しい)IDの検索結果を取得します。このAPIでアクセスできるツイート数には制限があります。 since_idで設定した範囲がツイート数の制限に引っかかった場合、since_id は使用できる範囲で最も古いIDに置き換えられます。

サンプル値: 12345

max_id 任意

これに指定したID以下(より古い)のIDの検索結果を取得します。

サンプル値: 54321

trim_user 任意

truet1を設定すると、取得したタイムライン上の各ツイートは、ツイート主のIDのみを持ったユーザーオブジェクトを内包します。 このパラメータを省略すると、完全なユーザーオブジェクトを取得します。

サンプル値: true

contributor_details 任意

このパラメータを使うと、サーバからの応答で得られるcontributors エレメントに、投稿者のscreen_name を含めることができます。 既定ではcontributors エレメントは投稿者のuser_id のみを内包しています。

サンプル値: true

include_entities 任意

falseを設定すると、 entitiesノードは含まれません。

サンプル値: false



OAuth 署名のジェネレータ

ログインして登録アプリケーションの一覧を参照してください。



リクエスト例

GET

https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=2&since_id=14927799



応答結果の例

[
  {
    "coordinates": null,
    "favorited": false,
    "truncated": false,
    "created_at": "Mon Sep 03 13:24:14 +0000 2012",
    "id_str": "242613977966850048",
    "entities": {
      "urls": [

      ],
      "hashtags": [

      ],
      "user_mentions": [
        {
          "name": "Jason Costa",
          "id_str": "14927800",
          "id": 14927800,
          "indices": [
            0,
            11
          ],
          "screen_name": "jasoncosta"
        },
        {
          "name": "Matt Harris",
          "id_str": "777925",
          "id": 777925,
          "indices": [
            12,
            26
          ],
          "screen_name": "themattharris"
        },
        {
          "name": "ThinkWall",
          "id_str": "117426578",
          "id": 117426578,
          "indices": [
            109,
            119
          ],
          "screen_name": "thinkwall"
        }
      ]
    },
    "in_reply_to_user_id_str": "14927800",
    "contributors": null,
    "text": "@jasoncosta @themattharris Hey! Going to be in Frisco in October. Was hoping to have a meeting to talk about @thinkwall if you're around?",
    "retweet_count": 0,
    "in_reply_to_status_id_str": null,
    "id": 242613977966850048,
    "geo": null,
    "retweeted": false,
    "in_reply_to_user_id": 14927800,
    "place": null,
    "user": {
      "profile_sidebar_fill_color": "EEEEEE",
      "profile_sidebar_border_color": "000000",
      "profile_background_tile": false,
      "name": "Andrew Spode Miller",
      "profile_image_url": "http://a0.twimg.com/profile_images/1227466231/spode-balloon-medium_normal.jpg",
      "created_at": "Mon Sep 22 13:12:01 +0000 2008",
      "location": "London via Gravesend",
      "follow_request_sent": false,
      "profile_link_color": "F31B52",
      "is_translator": false,
      "id_str": "16402947",
      "entities": {
        "url": {
          "urls": [
            {
              "expanded_url": null,
              "url": "http://www.linkedin.com/in/spode",
              "indices": [
                0,
                32
              ]
            }
          ]
        },
        "description": {
          "urls": [

          ]
        }
      },
      "default_profile": false,
      "contributors_enabled": false,
      "favourites_count": 16,
      "url": "http://www.linkedin.com/in/spode",
      "profile_image_url_https": "https://si0.twimg.com/profile_images/1227466231/spode-balloon-medium_normal.jpg",
      "utc_offset": 0,
      "id": 16402947,
      "profile_use_background_image": false,
      "listed_count": 129,
      "profile_text_color": "262626",
      "lang": "en",
      "followers_count": 2013,
      "protected": false,
      "notifications": null,
      "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/16420220/twitter-background-final.png",
      "profile_background_color": "FFFFFF",
      "verified": false,
      "geo_enabled": true,
      "time_zone": "London",
      "description": "Co-Founder/Dev (PHP/jQuery) @justFDI. Run @thinkbikes and @thinkwall for events. Ex tech journo, helps run @uktjpr. Passion for Linux and customises everything.",
      "default_profile_image": false,
      "profile_background_image_url": "http://a0.twimg.com/profile_background_images/16420220/twitter-background-final.png",
      "statuses_count": 11550,
      "friends_count": 770,
      "following": null,
      "show_all_inline_media": true,
      "screen_name": "spode"
    },
    "in_reply_to_screen_name": "jasoncosta",
    "source": "JournoTwit",
    "in_reply_to_status_id": null
  },
  {
    "coordinates": {
      "coordinates": [
        121.0132101,
        14.5191613
      ],
      "type": "Point"
    },
    "favorited": false,
    "truncated": false,
    "created_at": "Mon Sep 03 08:08:02 +0000 2012",
    "id_str": "242534402280783873",
    "entities": {
      "urls": [

      ],
      "hashtags": [
        {
          "text": "twitter",
          "indices": [
            49,
            57
          ]
        }
      ],
      "user_mentions": [
        {
          "name": "Jason Costa",
          "id_str": "14927800",
          "id": 14927800,
          "indices": [
            14,
            25
          ],
          "screen_name": "jasoncosta"
        }
      ]
    },
    "in_reply_to_user_id_str": null,
    "contributors": null,
    "text": "Got the shirt @jasoncosta thanks man! Loving the #twitter bird on the shirt :-)",
    "retweet_count": 0,
    "in_reply_to_status_id_str": null,
    "id": 242534402280783873,
    "geo": {
      "coordinates": [
        14.5191613,
        121.0132101
      ],
      "type": "Point"
    },
    "retweeted": false,
    "in_reply_to_user_id": null,
    "place": null,
    "user": {
      "profile_sidebar_fill_color": "EFEFEF",
      "profile_sidebar_border_color": "EEEEEE",
      "profile_background_tile": true,
      "name": "Mikey",
      "profile_image_url": "http://a0.twimg.com/profile_images/1305509670/chatMikeTwitter_normal.png",
      "created_at": "Fri Jun 20 15:57:08 +0000 2008",
      "location": "Singapore",
      "follow_request_sent": false,
      "profile_link_color": "009999",
      "is_translator": false,
      "id_str": "15181205",
      "entities": {
        "url": {
          "urls": [
            {
              "expanded_url": null,
              "url": "http://about.me/michaelangelo",
              "indices": [
                0,
                29
              ]
            }
          ]
        },
        "description": {
          "urls": [

          ]
        }
      },
      "default_profile": false,
      "contributors_enabled": false,
      "favourites_count": 11,
      "url": "http://about.me/michaelangelo",
      "profile_image_url_https": "https://si0.twimg.com/profile_images/1305509670/chatMikeTwitter_normal.png",
      "utc_offset": 28800,
      "id": 15181205,
      "profile_use_background_image": true,
      "listed_count": 61,
      "profile_text_color": "333333",
      "lang": "en",
      "followers_count": 577,
      "protected": false,
      "notifications": null,
      "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme14/bg.gif",
      "profile_background_color": "131516",
      "verified": false,
      "geo_enabled": true,
      "time_zone": "Hong Kong",
      "description": "Android Applications Developer,  Studying Martial Arts, Plays MTG, Food and movie junkie",
      "default_profile_image": false,
      "profile_background_image_url": "http://a0.twimg.com/images/themes/theme14/bg.gif",
      "statuses_count": 11327,
      "friends_count": 138,
      "following": null,
      "show_all_inline_media": true,
      "screen_name": "mikedroid"
    },
    "in_reply_to_screen_name": null,
    "source": "Twitter for Android",
    "in_reply_to_status_id": null
  }
]