Geolocation parameter on tweets
This commit is contained in:
@ -255,7 +255,7 @@ exports.getTwitter = function(req, res) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
T.get('search/tweets', { q: 'hackathon since:2013-01-01', count: 50 }, function(err, reply) {
|
T.get('search/tweets', { q: 'hackathon since:2013-01-01', geocode: '40.71448,-74.00598,5mi', count: 50 }, function(err, reply) {
|
||||||
res.render('api/twitter', {
|
res.render('api/twitter', {
|
||||||
title: 'Twitter API',
|
title: 'Twitter API',
|
||||||
user: req.user,
|
user: req.user,
|
||||||
|
@ -5,22 +5,23 @@ block content
|
|||||||
i.fa.fa-twitter(style='color: #4099ff')
|
i.fa.fa-twitter(style='color: #4099ff')
|
||||||
| Twitter API
|
| Twitter API
|
||||||
.btn-group.btn-group-justified
|
.btn-group.btn-group-justified
|
||||||
a.btn.btn-lg.btn-primary(href='https://github.com/ttezel/twit', target='_blank')
|
a.btn.btn-lg.btn-primary-outline(href='https://github.com/ttezel/twit', target='_blank')
|
||||||
i.fa.fa-file-text-o
|
i.fa.fa-file-text-o
|
||||||
| Twit Library Docs
|
| Twit Library Docs
|
||||||
a.btn.btn-lg.btn-primary(href='https://dev.twitter.com/docs', target='_blank')
|
a.btn.btn-lg.btn-primary-outline(href='https://dev.twitter.com/docs', target='_blank')
|
||||||
i.fa.fa-check-square-o
|
i.fa.fa-check-square-o
|
||||||
| Overview
|
| Overview
|
||||||
a.btn.btn-lg.btn-primary(href='https://dev.twitter.com/docs/api/1.1', target='_blank')
|
a.btn.btn-lg.btn-primary-outline(href='https://dev.twitter.com/docs/api/1.1', target='_blank')
|
||||||
i.fa.fa-code-fork
|
i.fa.fa-code-fork
|
||||||
| API Endpoints
|
| API Endpoints
|
||||||
h3.text-primary Latest 50 Tweets containing the word "Hackathon"
|
h3.text-primary Latest 50 Tweets containing the word "Hackathon" within NYC 5 mile radius
|
||||||
ul.list
|
ul.list
|
||||||
for tweet in tweets
|
for tweet in tweets
|
||||||
li
|
li
|
||||||
small
|
small
|
||||||
strong #{tweet.user.name}
|
strong #{tweet.user.name}
|
||||||
span.text-muted @#{tweet.user.screen_name}
|
span.text-muted @#{tweet.user.screen_name}
|
||||||
img(src='#{tweet.user.profile_image_url}')
|
.clearfix
|
||||||
p.well
|
- var image = tweet.user.profile_image_url.replace('_normal', '');
|
||||||
|
img.pull-left(src='#{image}', width=50, height=50)
|
||||||
small #{tweet.text}
|
small #{tweet.text}
|
Reference in New Issue
Block a user