Twitter.getUserProfile()

Get a user's Twitter profile information.

Usage

Hover over inputs/exits for more info.

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


// Get a user's Twitter profile information.

Twitter.getUserProfile({

screenName: 'johngalt',

: ,

: ,

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

screenName required

The Twitter screen name (i.e. username) of a Twitter account to look up.

'johngalt'
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.

{ name: 'John Galt',
  screenName: 'johngalt',
  profileImageUrl: 'http://pbs.twimg.com/profile_images/3367735923/e3fa48371ed40fb3466fc2cdec18a3aa_normal.jpeg',
  profileImageUrlHttps: 'https://pbs.twimg.com/profile_images/3367735923/e3fa48371ed40fb3466fc2cdec18a3aa_normal.jpeg',
  bannerImageUrl: 'https://pbs.twimg.com/profile_banners/54952598/1354583726',
  location: 'Galt\'s Gulch',
  description: 'Overall philosophical genius',
  createdAt: '2009-07-08T16:50:31.000Z',
  url: 'http://t.co/UDSfsSDFd',
  followersCount: 5050234234,
  friendsCount: 23423423423,
  listedCount: 2342,
  favoritesCount: 124,
  statusesCount: 23423,
  utcOffset: -18000,
  timezone: 'Eastern Time (US & Canada)',
  language: 'en',
  isGeoEnabled: true,
  isProtected: true,
  isVerified: true,
  isSuspended: true }