要oauth.js, sha1.js Consumer key Consumer secret をさらさないとダメなので、他の人に勝手に使われるよなあ でもしょうがないよなあ @ktty1220 さんによる別バージョンもあります <head> <script src="http://oauth.googlecode.com/svn/code/javascript/oauth.js"></script> <script src="http://oauth.googlecode.com/svn/code/javascript/sha1.js"></script> <script src="getTwitterAPI.js"></script> </head> // あらかじめアプリ登録して取得 var CONSUMER = { "key" : XXXXXXXXXXXXXXX, "secret"
![TwitterAPI v1.1(GET限定)に簡単アクセス - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/978b5c2cd2e56bd6f0470e69c66a12a960a1a328/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-412672c5f0600ab9a64263b751f1bc81.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTk3MiZoPTM3OCZ0eHQ9VHdpdHRlckFQSSUyMHYxLjElMjhHRVQlRTklOTklOTAlRTUlQUUlOUElMjklRTMlODElQUIlRTclQjAlQTElRTUlOEQlOTglRTMlODIlQTIlRTMlODIlQUYlRTMlODIlQkIlRTMlODIlQjkmdHh0LWFsaWduPWxlZnQlMkN0b3AmdHh0LWNvbG9yPSUyMzFFMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZzPTIwMGVmZmU4ODU0YjhiYTNjOGI5MzRlYWNkNmM2ODFj%26mark-x%3D142%26mark-y%3D57%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZoPTc2Jnc9NzcwJnR4dD0lNDByZXY4NCZ0eHQtY29sb3I9JTIzMUUyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9OWUzMzZhNTFmNDc5ZjQ3MDk0OGY1ODEwNDkyMmQ2NDU%26blend-x%3D142%26blend-y%3D486%26blend-mode%3Dnormal%26s%3D451a3037e97f868a7ab905f588ce4ebe)