# Logstash twitter plugin parses wrong user id

**URL:** <https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135>\
**Category:** Logstash\
**Created:** [June 26, 2021, 8:13pm UTC](https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135 "2021-06-26T20:13:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukasz\_Geras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukasz_geras/32/81151_2.png) [@Lukasz\_Geras](https://discuss.elastic.co/u/Lukasz_Geras)\
**Post date:** [June 26, 2021, 8:13pm UTC](https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135/1 "2021-06-26T20:13:13Z")

</div>

Hi, quick question regarding parsing tweets using logstash official plugin. I had a problem parsing tweets, that comes from account other than mine. As you see, using a online converter, I identified my real twitter ID:

```auto
@lucasgeras => 1408873307412312064

```

In the same time, my parser identifies my id as

```auto
[INFO][logstash.inputs.twitter][main][twitter] Starting twitter tracking {:follow=>"1407435583350317071"}

```

Could you please tell me if there's any solution for this issue, like providing the userID itself, or maybe I'am doing something wrong? I attach the parser itself:

```auto
twitter{
		id => "twitter"
		consumer_key => "censored"
		consumer_secret => "censored"
		oauth_token => "censored-censored"
		oauth_token_secret => "censored"
		follows => "lucasgeras"
		full_tweet => false
		ignore_retweets => false
	}

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 26, 2021, 9:07pm UTC](https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135/2 "2021-06-26T21:07:08Z")

</div>

> [@Lukasz\_Geras](#):
>
> like providing the userID itself

Looking at the [code](https://github.com/logstash-plugins/logstash-input-twitter/blob/f97a4e6a1c47146ae221d9f1413f319d3e513630/lib/logstash/inputs/twitter.rb#L246), if given a number in @follows it uses it as the id, otherwise it does a lookup on it as a username.

---

<div class="post-metadata">

**Author:** ![Lukasz\_Geras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukasz_geras/32/81151_2.png) [@Lukasz\_Geras](https://discuss.elastic.co/u/Lukasz_Geras)\
**Post date:** [June 26, 2021, 9:52pm UTC](https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135/3 "2021-06-26T21:52:39Z")

</div>

> [@Lukasz\_Geras](#):
>
> `1408873307412312064`

Fantastic. Works like a charm. Thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 24, 2021, 9:53pm UTC](https://discuss.elastic.co/t/logstash-twitter-plugin-parses-wrong-user-id/277135/4 "2021-07-24T21:53:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
