ここで解説するAPI 1は非推奨となっているため、API 1.1を使用すべきです。
認可されたユーザー、または他のユーザーのタイムラインを取得できます。
GET http://api.twitter.com/1/statuses/user_timeline.format
パラメータ | 説明 | 記述例 |
---|---|---|
user_id | The ID of the user for whom to return results for.
Helpful for disambiguating when a valid user ID is also a valid screen name. |
12345 |
screen_name | The screen name of the user for whom to return results for.
Helpful for disambiguating when a valid screen name is also a user ID. |
noradio |
since_id | Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available. | 12345 |
count | Specifies the number of tweets to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied.
We include retweets in the count, even if |
|
max_id | Returns results with an ID less than (that is, older than) or equal to the specified ID. | 54321 |
page | This parameter will soon cease to be functional See Working with Timelines
Specifies the page of results to retrieve. |
3 |
trim_user | When set to either true , t or 1 , each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object. |
true |
include_rts | When set to either true , t or 1 ,the timeline will contain native retweets (if they exist) in addition to the standard stream of tweets. The output format of retweeted tweets is identical to the representation you see in home_timeline. Note: If you're using the trim_user parameter in conjunction with include_rts, the retweets will no longer contain a full user object. |
true |
include_entities | When set to either true , t or 1 , each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, they will be made a default component of output in the future. See Tweet Entities for more detail on entities. |
true |
exclude_replies | This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count tweets — this is because the count parameter retrieves that many tweets before filtering out retweets and replies. This parameter is only supported for JSON and XML responses. |
true |
contributor_details | This parameter enhances the contributors element of the status response to include the screen_name of the contributor. By default only the user_id of the contributor is included. | true |
[{ "created_at": "Mon May 07 21:33:00 +0000 2012", "id": 199612823616241665, "id_str": "199612823616241665", "text": "Some apps are getting a 403 Forbidden when uploading images through statuses\/update_with_media -- more info: https:\/\/t.co\/OxDo0hI3 ^TS", "source": "web", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 6253282, "id_str": "6253282", "name": "Twitter API", "screen_name": "twitterapi", "location": "San Francisco, CA", "description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", "url": "http:\/\/dev.twitter.com", "protected": false, "followers_count": 1021528, "friends_count": 29, "listed_count": 10393, "created_at": "Wed May 23 06:01:13 +0000 2007", "favourites_count": 24, "utc_offset": -28800, "time_zone": "Pacific Time (US & Canada)", "geo_enabled": true, "verified": true, "statuses_count": 3284, "lang": "en", "contributors_enabled": true, "is_translator": false, "profile_background_color": "E8F2F7", "profile_background_image_url": "http:\/\/a0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png", "profile_background_image_url_https": "https:\/\/si0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png", "profile_background_tile": false, "profile_image_url": "http:\/\/a0.twimg.com\/profile_images\/1438634086\/avatar_normal.png", "profile_image_url_https": "https:\/\/si0.twimg.com\/profile_images\/1438634086\/avatar_normal.png", "profile_link_color": "0094C2", "profile_sidebar_border_color": "0094C2", "profile_sidebar_fill_color": "A9D9F1", "profile_text_color": "437792", "profile_use_background_image": true, "show_all_inline_media": false, "default_profile": false, "default_profile_image": false, "following": null, "follow_request_sent": null, "notifications": null }, "geo": null, "coordinates": null, "place": null, "contributors": [819797], "retweet_count": 104, "entities": { "hashtags": [], "urls": [{ "url": "https:\/\/t.co\/OxDo0hI3", "expanded_url": "https:\/\/dev.twitter.com\/issues\/347", "display_url": "dev.twitter.com\/issues\/347", "indices": [109,130] }], "user_mentions": [] }, "favorited": false, "retweeted": false, "possibly_sensitive": false }, { "created_at": "Mon May 07 17:33:32 +0000 2012", "id": 199552558795206657, "id_str": "199552558795206657", "text": "While revisiting your apps, you may find these useful: Working With Timelines https:\/\/t.co\/v9jKuHPI Field Guide: https:\/\/t.co\/hyZxOS4G ^TS", "source": "web", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 6253282, "id_str": "6253282", "name": "Twitter API", "screen_name": "twitterapi", "location": "San Francisco, CA", "description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", "url": "http:\/\/dev.twitter.com", "protected": false, "followers_count": 1021528, "friends_count": 29, "listed_count": 10393, "created_at": "Wed May 23 06:01:13 +0000 2007", "favourites_count": 24, "utc_offset": -28800, "time_zone": "Pacific Time (US & Canada)", "geo_enabled": true, "verified": true, "statuses_count": 3284, "lang": "en", "contributors_enabled": true, "is_translator": false, "profile_background_color": "E8F2F7", "profile_background_image_url": "http:\/\/a0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png", "profile_background_image_url_https": "https:\/\/si0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png", "profile_background_tile": false, "profile_image_url": "http:\/\/a0.twimg.com\/profile_images\/1438634086\/avatar_normal.png", "profile_image_url_https": "https:\/\/si0.twimg.com\/profile_images\/1438634086\/avatar_normal.png", "profile_link_color": "0094C2", "profile_sidebar_border_color": "0094C2", "profile_sidebar_fill_color": "A9D9F1", "profile_text_color": "437792", "profile_use_background_image": true, "show_all_inline_media": false, "default_profile": false, "default_profile_image": false, "following": null, "follow_request_sent": null, "notifications": null }, "geo": null, "coordinates": null, "place": null, "contributors": [819797], "retweet_count": 34, "entities": { "hashtags": [], "urls": [{ "url": "https:\/\/t.co\/v9jKuHPI", "expanded_url": "https:\/\/dev.twitter.com\/docs\/working-with-timelines", "display_url": "dev.twitter.com\/docs\/working-w\u2026", "indices": [78,99] }, { "url": "https:\/\/t.co\/hyZxOS4G", "expanded_url": "https:\/\/dev.twitter.com\/docs\/platform-objects", "display_url": "dev.twitter.com\/docs\/platform-\u2026", "indices": [114,135] }], "user_mentions": [] }, "favorited": false, "retweeted": false, "possibly_sensitive": false }]
プロパティ | 取得例 |
---|---|
created_at | "Mon May 07 21:33:00 +0000 2012" |
id | 199612823616241665 |
id_str | "199612823616241665" |
text | "Some apps are getting a 403 Forbidden when uploading images through statuses\/update_with_media -- more info: https:\/\/t.co\/OxDo0hI3 ^TS" |
source | "web" |
truncated | false |
in_reply_to_status_id | null |
in_reply_to_status_id_str | null |
in_reply_to_user_id | null |
in_reply_to_user_id_str | null |
in_reply_to_screen_name | null |
user | { ... } |
geo | null |
coordinates | null |
place | null |
contributors | [819797] |
retweet_count | 104 |
entities | { ... } |
favorited | false |
retweeted | false |
possibly_sensitive | false |
プロパティ | 取得例 |
---|---|
id | 6253282 |
id_str | "6253282" |
name | "Twitter API" |
screen_name | "twitterapi" |
location | "San Francisco, CA" |
description | "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website." |
url | "http:\/\/dev.twitter.com" |
protected | false |
followers_count | 1021546 |
friends_count | 29 |
listed_count | 10393 |
created_at | "Wed May 23 06:01:13 +0000 2007" |
favourites_count | 24 |
utc_offset | -28800 |
time_zone | "Pacific Time (US & Canada)" |
geo_enabled | true |
verified | true |
statuses_count | 3284 |
lang | "en" |
contributors_enabled | true |
is_translator | false |
profile_background_color | "E8F2F7" |
profile_background_image_url | "http:\/\/a0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png" |
profile_background_image_url_https | "https:\/\/si0.twimg.com\/profile_background_images\/229557229\/twitterapi-bg.png" |
profile_background_tile | false |
profile_image_url | "http:\/\/a0.twimg.com\/profile_images\/1438634086\/avatar_normal.png" |
profile_image_url_https | "https:\/\/si0.twimg.com\/profile_images\/1438634086\/avatar_normal.png" |
profile_link_color | "0094C2" |
profile_sidebar_border_color | "0094C2" |
profile_sidebar_fill_color | "A9D9F1" |
profile_text_color | "437792" |
profile_use_background_image | true |
show_all_inline_media | false |
default_profile | false |
default_profile_image | false |
following | null |
follow_request_sent | null |
notifications | null |
プロパティ | 取得例 |
---|---|
hashtags | [] |
urls | [ .. ] |
user_mentions | [] |
プロパティ | 取得例 |
---|---|
url | "https:\/\/t.co\/OxDo0hI3" |
expanded_url | "https:\/\/dev.twitter.com\/issues\/347" |
display_url | "dev.twitter.com\/issues\/347" |
indices | [109,130] |