Updated twitter api example.
- top 10 instead of top 50 - node.js term instead of hackathon - using media-list instead of ul.list-unstyled
This commit is contained in:
@ -253,7 +253,7 @@ exports.getTwitter = function(req, res, next) {
|
|||||||
access_token: token.accessToken,
|
access_token: token.accessToken,
|
||||||
access_token_secret: token.tokenSecret
|
access_token_secret: token.tokenSecret
|
||||||
});
|
});
|
||||||
T.get('search/tweets', { q: 'hackathon since:2013-01-01', geocode: '40.71448,-74.00598,5mi', count: 50 }, function(err, reply) {
|
T.get('search/tweets', { q: 'nodejs since:2013-01-01', geocode: '40.71448,-74.00598,5mi', count: 10 }, function(err, reply) {
|
||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
res.render('api/twitter', {
|
res.render('api/twitter', {
|
||||||
title: 'Twitter API',
|
title: 'Twitter API',
|
||||||
|
@ -18,18 +18,15 @@ block content
|
|||||||
| API Endpoints
|
| API Endpoints
|
||||||
|
|
||||||
br
|
br
|
||||||
.lead Latest 50 Tweets containing "Hackathon" in NYC within 5 miles
|
.lead Latest #{tweets.length} Tweets containing the term "nodejs" in NYC within 5 miles radius
|
||||||
|
|
||||||
ul.list-unstyled
|
ul.media-list
|
||||||
for tweet in tweets
|
for tweet in tweets
|
||||||
li
|
li.media
|
||||||
.panel.panel-default
|
a.pull-left(href='#')
|
||||||
.panel-body
|
- var image = tweet.user.profile_image_url.replace('_normal', '');
|
||||||
.clearfix
|
img.media-object(src='#{image}', style='width: 64px; height: 64px;')
|
||||||
- var image = tweet.user.profile_image_url.replace('_normal', '');
|
.media-body
|
||||||
img.pull-left(src='#{image}', width=50, height=50, style='margin-right: 10px')
|
strong.media-heading #{tweet.user.name}
|
||||||
|
span.text-muted @#{tweet.user.screen_name}
|
||||||
=tweet.user.name
|
p= tweet.text
|
||||||
small.text-muted @#{tweet.user.screen_name}
|
|
||||||
br
|
|
||||||
small #{tweet.text}
|
|
Reference in New Issue
Block a user