Anonymous user
Twitter: Difference between revisions
m
Changed name of tab from "API Keys" to "Keys and Access Tokens" as it is now named
imported>Paulproteus No edit summary |
imported>Clarkkarenl m (Changed name of tab from "API Keys" to "Keys and Access Tokens" as it is now named) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1:
[[File:Twitter.png|right|300px]]
== Project ==
Line 42 ⟶ 40:
Now, make the Twitter application able to post to your Twitter profile. To do that:
* Start at the app information page. (The '''Details''' tab should be selected.)
*
* Scroll down to '''
* Click '''Update
Line 51 ⟶ 49:
* Start at the app information page. (Make sure you are on the '''Details''' tab.)
* Switch to the '''Keys and Access Tokens''' tab.
* At the
* Write down the below credentials Twitter just created for your application,
** API key
** API secret
** Access token
** Access token secret
Once you have the above mentioned details, you can use the skeleton code shared below.
Line 88 ⟶ 86:
# Read through the <code>search</code> function in <code>twitter_functions.py</code>.
# Trace through the logic in <code>twitter_api.py</code> that turns the <code>--search</code> command line option into a call to <code>search</code>.
# Find <code>GetSearch</code> in the
<b>Check your understanding</b>: What does <code>api.GetSearch</code> return?
Line 97 ⟶ 95:
# Read through the <code>trendingTopics</code> function in <code>twitter_functions.py</code>.
# Trace through the logic in <code>twitter_api.py</code> that turns the <code>--trending-topics</code> command line option into a call to <code>search</code>.
# Find <code>GetTrendsWoeid</code> in the
<b>Check your understanding</b>: What are the differences between the <code>optparse</code> logic for <code>--search</code> and <code>--trending-topics</code>?
Line 169 ⟶ 167:
Extend <code>trendingTopics</code> so that a Yahoo! Where On Earth ID (WOEID) can be specified on the command line and trending topics for that location will be displayed instead of using the hardcoded <code>BOSTON_WOEID</code> to only display results for Boston.
You can look up WOEIDs by location at http://
===Congratulations!===
|