没有合适的资源?快使用搜索试试~ 我知道了~
首页Twitter API入门指南:轻松构建应用
Twitter API入门指南:轻松构建应用
需积分: 11 3 下载量 152 浏览量
更新于2024-07-23
收藏 2.92MB PDF 举报
"Twitter API:构建与运行] 是一本由 Kevin Makice 编著的专业书籍,主要探讨了如何利用 Twitter 的应用程序接口(API)进行开发。这本书面向初学者,提供了易于理解的指南,让读者能够在短时间内掌握 Twitter API 的基础并开展实际项目。书中包含了丰富的示例代码和实践经验,帮助读者迅速提升到高级应用水平。受到了行业内多位知名开发者的好评,他们认为这本书是入门 Twitter API 开发的理想资源,能引领读者快速掌握 API 的核心知识和技巧。"
在《Twitter API:构建与运行》一书中,作者 Kevin Makice 深入浅出地介绍了如何利用 Twitter API 创建和运行各种应用程序。Twitter API 是 Twitter 提供给开发者用于访问其平台数据和服务的接口,允许开发者构建社交功能、分析用户行为、甚至创建新的社交媒体应用。
首先,书中的内容涵盖了 Twitter API 的基础知识,包括注册开发者账户、获取 API 访问密钥、理解和使用 REST API 以及实时流式 API。这些基础知识对于任何想要与 Twitter 平台互动的开发者来说都是必不可少的。
其次,书中的实例项目和实战指导让读者能够快速上手实践。通过构建实际的 Twitter 应用,如自动发布推文、抓取用户数据、分析趋势等,读者可以深入理解 API 的工作原理,并学习如何处理常见的问题和挑战,如率限制和数据安全。
此外,书里还涉及了 API 设计原则、最佳实践以及如何调试和优化 API 请求。对于想要开发高效、稳定且用户体验良好的 Twitter 应用的开发者,这些内容具有极高的价值。
书中的案例研究和专家见解为读者提供了宝贵的行业洞察。作者分享了成功应用背后的设计思路,以及来自 Twitter API 领域专家的经验教训,有助于读者避免常见陷阱,提升应用的质量和创新性。
最后,书中还探讨了与 Twitter 相关的热门话题,如 OAuth 身份验证、实时流处理、数据挖掘和分析,以及如何利用第三方库和工具来简化开发流程。这些话题使读者能够紧跟 Twitter 技术的发展趋势,为未来的项目做好准备。
《Twitter API:构建与运行》是一本全面而实用的教程,无论你是初次接触 Twitter API 的新手,还是寻求深化理解的有经验开发者,都能从中受益匪浅,实现从入门到精通的飞跃。
As Twitter lowers barriers to publication through its simplicity, so this book will pro-
vide easy access to the skills and resources you’ll need to build web applications for its
API.
Who This Book Is For
The cultivation of open API development represents another level of evolution in In-
ternet participation. We aren’t just reading and writing content; we’re also cocreating
the interactions surrounding that content. Twitter, in particular, has a low barrier for
both. The most important property of the Twitter API is not found in the nuances of
its syntax, but rather in the imaginative and prolific cocreation it inspires.
This groundbreaking book is for Twitter fans who want to do more than just answer
the question, “What are you doing?” In this first book about working with the Twitter
API, new and casual programmers are provided with explanations of how each part of
the API functions and examples of how those parts can be assembled into web appli-
cations. We’ll also look closely at the culture of Twitter and how it has inspired pro-
grammers to build their own tools and games.
A prerequisite for this book is a basic understanding of how applications are built and
hosted on the Web. However, you don’t need to be a professional coder to launch a
Twitter web application successfully. The XHTML, CSS, PHP, and MySQL code nec-
essary to the construction of the example applications will be provided and explained,
as will some suggested criteria for securing a website. You should be able to pick up
this book, follow the sample code, and have at your disposal a working application to
use and modify.
The sample code can be downloaded from this book’s website (http://
www.oreilly.com/catalog/9780596154615/). It is open and available for
anyone to use.
Among the wide range of readers of this book will be IT professionals in small organ-
izations and Twitter members looking for a programming project. In the former sce-
nario, an IT professional may be looking at Twitter as a potential platform to integrate
existing services or products provided by his employer. He can use this book to survey
some web tools that might serve as a foundation for a larger web application. In this
context, it becomes a project companion with additional long-term value as a reference
and directory of sample applications.
In the latter scenario, an active member of the Twitter community may have grown
tired of waiting for someone else to provide missing functionality and be thinking about
adding it herself. She might read this book first to see what is out there, in case someone
has already built the desired tool, and then try to code the web application herself. She
may not consider herself a programmer, but she can build off of the sample code and
xiv | Preface
learn details by referencing the chapters on PHP and MySQL functions, selecting the
sample application closest to what she has in mind and then making changes to add
the desired behavior.
Twitter is a hot topic, but not much has been written about it yet. Therefore, the in-
formation this book contains on the history of the Twitter culture will also make it
attractive to nonprogrammers who want to understand the phenomenon, such as de-
cision makers for company development teams or active Internet users new to Twitter.
How This Book Is Organized
This book introduces the Twitter API in the context of a greater community culture,
offering a suite of sample applications to help illustrate some key programming con-
cepts. Here’s a synopsis of what you’ll find:
Chapter 1, Hello Twitter
Gives you a comprehensive overview of the Twitter culture, including the history
of microblogging, the Fail Whale, the company business model, the API developer
community, and creative uses of Twitter.
Chapter 2, Twitter Applications
Reviews more than two dozen existing third-party Twitter web applications you
can use as inspiration for your own creations. The applications are grouped into
seven tools categories—Publishing, Information Stream, Appropriation, Search,
Aggregation, Statistics, and Follow Network tools—and each app is profiled with
a screenshot and a description of what it does.
Chapter 3, Web Programming Basics
Provides a comprehensive starter kit for XHTML, CSS, PHP, and MySQL. This
chapter is meant to be a primer for new programmers and a convenient reference
for more experienced programmers. It also offers some advice on what to look for
when searching for a web host to care for your new application.
Chapter 4, Meet the Twitter API
Gives the details on how to make requests of the Twitter API. Included in the
general explanation are format differences, HTTP methods and error codes, au-
thentication, and rate limits. This chapter contains a directory of all of the param-
eters used by the API and a description of each of the 40 methods, grouped into
seven categories: Publishing, Information Stream, Follow Network, Communica-
tion, Member Account, API Administration, and Search. It also includes a discus-
sion about security issues involving Basic Auth and a brief description of how to
use cURL to test the API.
Chapter 5, Meet the Output
Takes a look at what comes out of the API as a response from Twitter. The various
types of XML objects you will encounter—user, status, message, search, ID,
Preface | xv
response, and hash—are detailed with example output, explanations of the inclu-
ded XML elements, and a list of methods that return that object.
Chapter 6, Application Setup
Discusses the things you need to do to get your web environment ready, including
creating a master Twitter account, making your MySQL database tables, creating
your stylesheet, and uploading custom functions to a directory outside the web
path. Each of the custom functions used in the sample applications is discussed in
detail, with a description of what it does and PHP code provided as examples.
Chapter 7, Sample Applications
Describes the web interfaces from the suite of sample applications. For each of the
seven applications, I’ll run you through how to use it and what it does, and then
we’ll look closely at the code. Included are suggestions for how to make this starter
code better.
Chapter 8, Automated Tasks
Describes the code for the programs from the suite of sample applications that run
in the background. It includes a brief explanation of what each of the five scripts
does and how the PHP code works.
Appendix
Provides a bare-bones look at the Twitter API, listing the method path, whether it
requires authentication, if it is charged against your rate limit, the HTTP method
type, and any required and optional parameters.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Used for emphasis, technical terms where they are defined, URLs, email addresses,
filenames, file extensions, and pathnames.
Constant width
Used for code samples, SQL statements, HTML and XML elements, methods,
functions, variables and attributes and their values, objects, and class names.
Constant width italic
Used for user-replaceable items in code.
Constant width bold
Used for emphasis in code samples.
This icon signifies a tip, suggestion, or general note.
xvi | Preface
This icon indicates a warning or caution.
Using Code Examples
You may use the code in this book in your programs and documentation. You do not
need to contact us for permission unless you’re reproducing a significant portion of the
code. For example, writing a program that uses several chunks of code from this book
does not require permission. Selling or distributing a CD-ROM of examples from this
book does require permission. Answering a question by citing this book and quoting
example code does not require permission. Incorporating a significant amount of ex-
ample code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title,
author, publisher, and ISBN. For example: “Twitter API: Up and Running, by Kevin
Makice. Copyright 2009 Kevin Makice, 978-0-596-15461-5.”
If you feel your use of code examples falls outside fair use or the permission given above,
feel free to contact us at permissions@oreilly.com.
Safari® Books Online
When you see a Safari® Books Online icon on the cover of your favorite
technology book, that means the book is available online through the
O’Reilly Network Safari Bookshelf.
Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily
search thousands of top tech books, cut and paste code samples, download chapters,
and find quick answers when you need the most accurate, current information. Try it
for free at http://my.safaribooksonline.com/.
We’d Like to Hear from You
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
Preface | xvii
We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at:
http://www.oreilly.com/catalog/9780596154615/
To comment or ask technical questions about this book, send email to:
bookquestions@oreilly.com
For more information about our books, conferences, Resource Centers, and the
O’Reilly Network, see our website at:
http://www.oreilly.com
Acknowledgments
It has always been a dream to write a book. While for a long time I thought it would
be about time travel or dragons, I’m delighted that my dream was fulfilled under the
banner of O’Reilly Media. For that, I have a number of people to thank.
This book is dedicated to my family—Amy (@amakice), Carter (@cmakice), Archie,
and the TBD baby we were creating during the nine months it took to write this tome—
who went out of their way to give me time and space to type, type, type. By now, with
me five years into an older-student Ph.D., they are used to helping me get my 3–5 hours
of sleep each night, while keeping me fed and entertained. However, writing a book on
top of graduate school is like adding a couple more dissertations to the workload. It
takes a village to write a tech book. As they supported me, my family received support
from Amy’s and my parents—Susan Clendening (@twobigdogs); Roger (@rjisb) and
Jean Isbister; Gary and Carol Clendening; Joy and Pete Kottra—and our friends. I am
particularly grateful for the supplemental financial support from that group and from
my long-time friend, Tim Roessler, who can now take this dedication as a direct request
to sign up for Twitter.
From the O’Reilly camp, Laurel Ruma (@laurelatoreilly) ran point on this project.
Despite my being intimidated by both the brand and the endeavor, she held my virtual
hand throughout the process and gently kept me on task. That this book arrived on
bookshelves near you is a credit to her stewardship that made this project such a won-
derful experience for me. I wouldn’t have met her at all if it weren’t for Jeffrey Bardzell
(@jeffreybardzell), my professor and friend, who referred me to his agent Carole Jelen
McClendon at Waterside Productions. Carole, now my agent, helped me pitch an idea
for a Twitter book to John Osborn (@johnatlarge) and Laurel. Nine months later I was
holding my first published book. From top to bottom, the O’Reilly Media organization
was amazing. Rachel Head, Sarah Schneider, Marlowe Shaeffer, and Rachel Monaghan
were also key to completing this project, and I thank them all for their professionalism
and patience.
xviii | Preface
剩余415页未读,继续阅读
Judas623
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 粉色浪漫遇见你遇见爱PPT模板
- CSS3实现的3D图片切换效果
- counter-app:ReacJS | 柜台应用
- ekv-scala:基于目录和文件的加密密钥值存储库
- Algorithm-go-cluster.zip
- 条码扫描器
- 太阳能和热泵全自动控制电路图
- PHP-Filechange-Tracker:PHP类可根据修改时间跟踪文件的更改
- android-classyshark:分析任何基于AndroidJava的应用或游戏
- CH341A编程器软件1.3支持25Q256等32M芯片
- 华为eNSP 设备镜像文件CX和CE系列压缩包
- iOS翻书效果 Leaves.zip
- The-Next-Web:thenextweb.com主页的克隆
- 解开绳子HTML5游戏源码
- 精致卡片样式的中国风PPT模板
- 丹佛斯变频器VLT_FC280_PROFIBUS通信_GSD文件.zip
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功