# latest-tweets

> get the latest tweets from a Twitter user timeline

Latest version **1.0.4** (published 2018-11-28) · 0 weekly downloads

## Install

```sh
npm install latest-tweets
pnpm add latest-tweets
yarn add latest-tweets
bun add latest-tweets
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-11-28 |
| First published | 2015-10-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 (+17 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | noffle, sww |
| Keywords | twitter, tweets, browser, node, no api, api |

## Links

- npm: https://www.npmjs.com/package/latest-tweets
- Repository: https://github.com/noffle/latest-tweets
- Homepage: https://github.com/noffle/latest-tweets#readme
- Issues: https://github.com/noffle/latest-tweets/issues
- npm.io page: https://npm.io/package/latest-tweets

## Dependencies (4)

- [xpath](https://npm.io/package/xpath.md) 0.0.9
- [xmldom](https://npm.io/package/xmldom.md) ^0.1.19
- [request](https://npm.io/package/request.md) ^2.65.0
- [unescape](https://npm.io/package/unescape.md) ^0.1.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2018-11-28
- 1.0.3 — 2017-01-05
- 1.0.2 — 2016-10-20
- 1.0.1 — 2016-10-08
- 1.0.0 — 2016-08-12
- 0.1.5 — 2016-05-02
- 0.1.4 — 2016-05-02
- 0.1.3 — 2016-05-02
- 0.1.2 — 2016-04-30
- 0.1.1 — 2015-10-26
- 0.1.0 — 2015-10-25

## README

# latest-tweets

> get a JSON array of a Twitter user's latest tweets -- no Twitter API required!

## background

Based on the [Perl implementation](http://perlmonks.org/?node_id=1039382) by
[ciderpunx](http://perlmonks.org/?node_id=373188).

This was written to be used in Node, but it embeds a CORS proxy url so you can
use it without any configuration in the browser using e.g.
[browserify](https://github.com/substack/node-browserify).

## usage

```js
var latestTweets = require('latest-tweets')

latestTweets('noffle', function (err, tweets) {
  console.log(tweets)
})
```

This will output an array of objects:

```js
[ { url: 'https://twitter.com/noffle/status/700514938750521344',
    content: 'We worry about what others think of us when we don\'t know what we think of ourselves.',
    date: 'Fri Feb 19 2016 02:59:10 GMT+0100 (CET)' },
    username: '@noffle',
    fullname: 'Stephen Whitmore',
    image: 'https://imageurl.com/image_id_1'
  { url: 'https://twitter.com/noffle/status/727096493543317504',
    content: 'API tokens are awful and don\'t let anybody tell you otherwise.',
    date: 'Mon May 02 2016 11:24:47 GMT+0200 (CEST)' },
    username: '@noffle',
    fullname: 'Stephen Whitmore',
    image: 'https://imageurl.com/image_id_1'
  ...
```

## api

```js
var latestTweets = require('latest-tweets')
```

### latestTweets(username, cb(err, tweets))

Specify a `username` of the timeline you want. The callback `cb` will contain an
optional error as its first parameter, and an array with the user's latest
tweets as its second parameter.

## installation

```sh
$ npm i latest-tweets
```

## ever-shifting ground

Scraping HTML is a foundation upon ever-shifting ground. As Twitter changes
[what is essentially an unofficial API], things will break. If you notice that
`latest-tweets` isn't working, please file an issue. Better yet, file a fixing
pull request.

## license

MIT

---
_Source: https://npm.io/package/latest-tweets · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
