twitter-profile-media
v2.0.6
Published
Get twitter profile image and banner
Downloads
40
Maintainers
Readme
twitter-profile-media
Get twitter profile image and banner
Install
npm install --save twitter-profile-media
Usage
import media from 'twitter-profile-media';
import tokens from 'twitter-tokens';
media(tokens, 'twitter').then(({ image, banner }) => {
image; // https://pbs.twimg.com/profile_images/615680132565504000/EIpgSD2K.png
banner; // https://pbs.twimg.com/profile_banners/783214/1436401887
});
API
media(tokens, username)
Return a promise that resolves to user profile image and banner.
tokens
Type: object
Valid twitter tokens (dev credentials). You can use twitter-tokens to simplify getting tokens.
username
Type: string
Twitter username.
Related
- get-tweets — get latest tweets
- get-twitter-info — get info about target username
- get-twitter-followers — get followers for target username
- tweet-links — extract links from tweet
- tweets-stats — get statistics from array of tweets
- twitter-mentions — get latest mentions for target username
- twitter-tokens — get twitter tokens
License
MIT