Home Page Icon
Home Page
Table of Contents for
Twitter API: Up and Running
Close
Twitter API: Up and Running
by Kevin Makice
Twitter API: Up and Running
A Note Regarding Supplemental Files
Preface
Who This Book Is For
How This Book Is Organized
Conventions Used in This Book
Using Code Examples
Safari® Books Online
We’d Like to Hear from You
Acknowledgments
1. Hello Twitter
What Are You Doing?
Rules of Engagement
Opportunistic Interruptions
Twitter Is Like a Side-by-Side Conversation
History of Twitter
A Brief History of Microblogging
Believe It or Not: Twitter Was Inspired by Bike Couriers
Millions and Millions Served
The Rise of the Fail Whale
Who Wants to Be a Millionaire? Gauging Twitter’s Profitability
Charging for service
Self-selecting advertisers
Implementing an open source service model
Developers Are Users, Too
Creative Uses of Twitter
Twitter Utilitarianism
Twitter for News
Twitter for Science
Twitter for God
Twitter for Emergencies
Twitter for Marketing
Twitter for Social Change
Twitter for Money
Twitter for Games
Twitter for Anthropomorphism
Twitter for Help
Twitter for Creativity
Twitter for Education
Twitter for Entertainment
Twitter for Sports
Twitter for Evil
Twitter As a Shared Event
Twitter for Everyone
A Changing Culture
2. Twitter Applications
Twitter’s Open API
Finding Inspiration
Tools for Publishing
Twitterfeed
SnapTweet
SecretTweet
Tools for the Information Stream
Twittervision
Twitter Matrix
Twalala
Tools of Appropriation
Track This
LiveTwitting
FoodFeed
Tools for Search
TwitDir
Green Tweets
TweetBeep
Tweet Scan
Favrd
Tools of Aggregation
Twappi
Twitscoop
Twist
Tools for Statistics
What’s Your Tweet Worth?
TweetStats
Follow Cost
Twitter Grader
Twitterank
Tools for the Follow Network
Does Follow
Qwitter
Friend or Follow
Mr. Tweet
Omnee
Twitree
And Many More
3. Web Programming Basics
XHTML
Web Pages
Form tags
A Nod to Some Other XML Structures
CSS
Assigning Styles to Structure
Laying Out Your Web Page Content
Decorating the Web Page Content
Getting the Browser to Recognize Styles
PHP
How to Accept Candy from Strangers
SQL injection attacks
CRLF injection attacks
Cross-site request forgery (CSRF) attacks
Strings, Arrays, and Objects
Manipulating the Data You Collect
Knowing Your Environment
Controlling the Flow of Logic
if…elseif…else
while
for
foreach
switch…case…break
try…catch
die() or exit()
File Management
Connecting to the Database
Building a Custom Function
Including more code in your application
Defining your own function
SimpleXML
DOM
cURL
Debugging
MySQL
Creating a New Table
Retrieving Information from the Database
Changing Information in the Database
A Place to Call /home
Selecting a Host Server
Automation
Pseudoautomation hacks
Further Reading
4. Meet the Twitter API
Accessing the API
HTTP Requests
GET
POST
DELETE
HTTP Status Codes
Format
RSS and Atom
Authentication
A Peak at OAuth
Parameters
Parameters that may be required
Other parameters that may be useful
Rate Limiting
Checking the rate limit status
Whitelisting
Keeping Development Light
Play Along at Home
The API Methods
Publishing
Post a Tweet
Delete a Tweet
The Information Stream
Show a Tweet
View the Public Timeline
View a Friends Timeline
View an Individual Timeline
View Replies
View Favorites
Create a Favorite
Delete a Favorite
The Follow Network
Show Member Profile
View Members Being Followed
View Followers
Get All Followers
Get All Friends
Follow a Member
Unfollow a Member
Confirm a Follow
Block a Member
Remove a Block
Communication
List Received Messages
List Sent Messages
Create a Message
Delete a Message
Show a Message
Member Account
Update Member Location
Update Member Profile
Update Profile Colors
Update Background Image
Update Profile Image
Update the Delivery Device
Turn On/Off Notification
API Administration
Test
Verify Credentials
Check Rate Limit Status
End a Member Session
Search
Keyword Search
Content searches
Meta filters
Operators
Optional parameters
Monitor Trends
Other Data Options
Gone Phishing: A Word About Passwords
Is Twishing Worth the Effort?
Controlling
Invading
Stealthing
Screaming
Damaging
Annoying
Deceiving
OAuth Can Help
5. Meet the Output
User Objects
User Elements
Status Objects
Status Elements
Message Objects
Direct Message Elements
Search Objects
Feed Elements
Entry Elements
ID Objects
ID Elements
Response Objects
Response Elements
Hash Objects
Hash Elements
Errors
6. Application Setup
Establishing Your Twitter Account
Registering a New Twitter Member Account
Configuring Your New Account
Account tab
Picture tab
Other settings
Creating Your Database
Making Sure There Is a There There
Giving the Database Some Structure
Included Functions
Creating Your Includes Directory
Environment Functions
getServerPath()
getHTTPpath()
API Configuration Functions
prepAPI()
prepRequest()
apiRequest()
Database Functions
getDBconfiguration()
openDB()
closeDB()
SQL Queries
getQueries()
Data Parsing Functions
parseFeed()
parseXML()
createDOMfromURL()
createParserFromString()
createXMLshell()
createRSSshell()
formatTweetAsXHTML()
addItem()
Password Management Functions
securePassword()
comparePassword()
scramblePassword()
unscramblePassword()
Data Validation Functions
checkInput()
isSubmitted()
isValidTweet()
hasCredentials()
hasAccess()
Data Sorting Functions
sortData()
compareFollowNet()
Statistics Functions
groupStats()
Log Management Functions
openFile()
writeFile()
closeFile()
deleteFile()
Status Messages
getResponse()
HTML Template Functions
getHeader()
getInterface()
getFooter()
CSS
7. Sample Applications
Meet the Sample Apps
Why Are You Asking for My Password?
Administration Tool
Take the App for a Spin
Check Under the Hood
Include external functions
Initialize values
Parse input
Configure API requests
Initiate cURL
Prepare database interaction
Validate access
Save data
Determine feedback response
Clean up
Render interface
Shifting Gears
Tweet Publisher
Take the App for a Spin
Check Under the Hood
Parse input
Post message
Render interface
Shifting Gears
Auto Tweet
Take the App for a Spin
Check Under the Hood
Parse input
Disable profile
Retrieve stored data
Process deletion request
Check feed
Save profile
Shifting Gears
Tweet Broadcast
Take the App for a Spin
Check Under the Hood
Retrieve stored data
Process deletion request
Compare groups
Save group
Render interface
Shifting Gears
Broadcast Feed
Take the App for a Spin
Check Under the Hood
Parse input
Retrieve update timestamp
Initiate XML
Add daily updates
Render RSS feed
Shifting Gears
Tweet Alert
Take the App for a Spin
Check Under the Hood
Confirm follower status
Shifting Gears
Network Viewer
Take the App for a Spin
Check Under the Hood
Get user profile
Get follow network
Sort follow network
Format follow network
Render interface
Shifting Gears
Best of Twitter API
Take the App for a Spin
Check Under the Hood
Parse input
Add bookmarks
Shifting Gears
8. Automated Tasks
RSS to Tweet
Check Under the Hood
Include external functions
Initiate logging
Prepare database interaction
Retrieve stored data
Post message
Clean up
Log output
Aggregate Broadcast
Check Under the Hood
Retrieve stored data
Purge old stored data
Log output
Scan Tweets
Check Under the Hood
Retrieve master password
Retrieve last ID
Check for matching tweets
Format message
Retrieve users
Confirm follower status
Notify users
Log activity
Log output
Queue Users
Check Under the Hood
Mine new users
Collect Favorites
Check Under the Hood
Retrieve master password
Retrieve queue
Retrieve favorites
Update queue
Log output
A. Twitter API Reference
Status Methods
Delete a Tweet
View Followers
View Members Being Followed
View a Friends Timeline
View the Public Timeline
View Replies
Show a Tweet
Post a Tweet
View an Individual Timeline
Users Methods
Show Member Profile
Direct Message Methods
List Received Messages
Delete a Message
Create a Message
List Sent Messages
Friendship Methods
Follow a Member
Unfollow a Member
Confirm a Follow
Social Graph Methods
Get All Friends
Get All Followers
Account Methods
End a Member Session
Check Rate Limit Status
Update the Delivery Device
Update Member Location
Update Member Profile
Update Background Image
Update Profile Colors
Update Profile Image
Verify Credentials
Favorite Methods
View Favorites
Create a Favorite
Delete a Favorite
Notification Methods
Turn On Notification
Turn Off Notification
Block Methods
Block a Member
Remove a Block
Help Methods
Test
Search Methods
Keyword Search
Monitor Trends
Index
About the Author
Colophon
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
A Note Regarding Supplemental Files
Twitter API: Up and Running
Kevin Makice
Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset