apache / apache/beam

[Bug]: Twitter example not working due to deprecation of v1 stream endpoint

Open
#21,952 2 comments 0 reactions 1 assignee Claimed by @kisaga View on GitHub
bug examples java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

Recently I started getting involved in the OSS world and when I pulled this project and tried to run the java examples I met the following failure.

## Failure
After getting credentials and overcoming the 401 responses I felt into the following:
```
[Mon Jun 20 19:06:11 EEST 2022]403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
\n\n\nError 403
Please use V2 filtered and sample volume stream as alternatives

HTTP ERROR: 403


Problem accessing '/1.1/statuses/filter.json'. Reason:

    

Please use V2 filtered and sample volume stream as alternatives

```
From [this announcement](https://twittercommunity.com/t/deprecation-announcement-removing-compliance-messages-from-statuses-filter-and-retiring-statuses-sample-from-the-twitter-api-v1-1/170500) I understood that a migration should be done to start using the v2 stream api.

The java twitter example should be migrated to the v2 endpoint.

### Issue Priority

Priority: 3

### Issue Component

Component: examples-java

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.