Twitter.searchTweets()

Search tweets on Twitter.

Usage

Hover over inputs/exits for more info.

var Twitter = require('machinepack-twitter');


// Search tweets on Twitter.

Twitter.searchTweets({

q: 'pizza',

latitude: 32,

longitude: 24,

radius: 2,

: ,

: ,

accessToken: 'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR',

accessSecret: 'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR',

bearerToken: 'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

q

The search query.

'pizza'
latitude

32
longitude

24
radius

The radius to search (in km).

2
undefined

undefined

accessToken

The access token for a given user (granted by Twitter)

'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR'
accessSecret

The access secret for a given user (granted by Twitter)

'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR'
bearerToken

Can be used in place of `consumerKey`, `consumerSecret`, `accessToken`, and `accessSecret`.

'QDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mR'

Exits

error

An unexpected error occurred.

success

OK.

[ '===' ]