Read Tweets from a User's Timeline Using v2 API

Updated: Feb 21, 2022
 * Copyright (c) 2006-2022 North Concepts Inc.  All rights reserved.
 * Proprietary and Confidential.  Use is subject to license terms.
package com.northconcepts.datapipeline.examples.twitter2;

import com.northconcepts.datapipeline.core.StreamWriter;
import com.northconcepts.datapipeline.job.Job;
import com.northconcepts.datapipeline.twitter2.TwitterTimelineTweetsReader;

public class ReadTweetsFromAUsersTimelineUsingV2 {

    private static final String API_KEY = "YOUR_API_KEY";
    private static final String API_SECRET = "YOUR_API_SECRET";
    private static final String BEARER_TOKEN = "YOUR_BEARER_TOKEN";

    public static void main(String[] args) {

        TwitterTimelineTweetsReader reader = new TwitterTimelineTweetsReader(API_KEY, API_SECRET, BEARER_TOKEN, "TwitterDev");
        reader.setMaxResults(100);, new StreamWriter(System.out));

All Examples

Mobile Analytics