forked from tweepy/tweepy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf4ebd0
commit 801c81e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import tweepy | ||
|
||
# === Basic Authentication === | ||
# | ||
# *Note: Basic Authentication is deprecated and no longer supported on Twitter. | ||
# It is still provided for use in services like Status.net which still suppports it.* | ||
# | ||
# This mode of authentication requires the user provide their username and plain text password. | ||
# These credentials will then be provided for each request to the API for authentication. | ||
|
||
# You would normally fetch this in your application | ||
# by asking the user or loading from some dark place. | ||
username = "" | ||
password = "" | ||
|
||
# Create an authentication handler passing it the username and password. | ||
# We will use this object later on when creating our API object. | ||
auth = tweepy.auth.BasicAuthHandler(username, password) | ||
|
||
# Create the API object providing it the authentication handler to use. | ||
# Each request will then be authenticated using this handler. | ||
api = tweepy.API(auth) | ||
|
||
api.update_status('Updating using basic authentication via Tweepy!') | ||
|