Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <!--
- Copyright (C) 2012 Twitter, Inc.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- Distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <script charset="utf-8" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
- </head>
- </html>
- <body>
- <table>
- <tr><td>
- <textarea id="in" cols="50" rows="30">yusukey
- yusuke</textarea></td><td><input type="button" onclick="fire()" value="lookup"/></td><td>
- <textarea id="out" cols="50" rows="30"></textarea>
- </td>
- </table>
- <script>
- function fire(){
- var users = $("#in").val().split("\n").join(",");
- $.getJSON("https://api.twitter.com/1/users/lookup.json?screen_name="+users+"&callback=?",
- function(data){
- var out = "";
- $.each(data, function(i,user){
- out+= "@"+user.screen_name + "," + user.followers_count+"\n";
- });
- $("#out").val(out);
- });
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment