All Questions
1,970
questions
0
votes
1
answer
402
views
TypeError: Client.create_tweet() takes 1 positional argument but 2 were given
I’m making my first bot but I get this error when running it.
Made with python 3.11 tweepy.
TypeError: Client.create_tweet() takes 1 positional argument but 2 were given
Code:
import tweepy
client = ...
0
votes
1
answer
688
views
How to display the number of Twitter followers (API v2) on my website?
I used to display the Twitter followers count from a username (for example robbiewilliams) on my website but since API v2, it doesn't work anymore...
To solve this problem, I created a developer ...
0
votes
0
answers
154
views
Consumer key must be string or bytes, not NoneType
I have done everything correctly and putted everything key correctly. So why it is showing the error.
`import tweepy
import openai
# replace the placeholders with your own keys and tokens
...
0
votes
1
answer
814
views
Error while redirecting to Twitter authorization URL
I was trying to authorize my app using tweepy. But when redirected to the authorization url, i see a Twitter page like this:
"Failed to grant access to the application. Try going back and ...
1
vote
1
answer
562
views
Stream encountered HTTP error: 404 HTTP error response text
def start_streaming_tweets(self, search_term):
self.filter(track=search_term, stall_warnings=True, languages=["en"])
if name == 'main':
twitter_stream = TweetListener(consumerKey, ...
0
votes
1
answer
355
views
I can't use "rtweet" package in R
I am trying to setup the default authentication mechanism of the "rtweet" package. But i got this error:
"Error in httr::init_oauth1.0(endpoint, app, permission = permission, ...
0
votes
1
answer
447
views
Twitter Pagination
I found this Twitter API v2 code sample:
import requests
import os
import json
# To set your environment variables in your terminal run the following line:
# export 'BEARER_TOKEN'...
0
votes
0
answers
283
views
TypeError: Twit is not a constructor
const Twit = import("twit");
const notfier = import("node-notifier");
const open = import("open");
var T = new Twit({
consumer_key: apikey,
consumer_secret: apiSecretKey,
...
0
votes
0
answers
150
views
Tweepy Stream doesn't connect
I want to create a Twitter-Bot in Python with Tweepy for a school-project. I'm using the v2 Twitter API and the latest Tweepy update 4.13.0.
My problem:
I already got the bot to work a few times, but ...
0
votes
1
answer
116
views
How can I call several user_names in the Twitter API?
I could successfully get the data of a user in Python by get_all_tweets(user_name). Now I would like to retrieve data from several users in the same code.
I tried to copy the same code and append it ...
0
votes
1
answer
497
views
Twitter /2/users/:id/tweets returns 401 when using parameter start_time
I am calling this endpoint https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets using OAuth 1.0a
The endpoint works perfectly fine without the ...
0
votes
1
answer
226
views
How to get full json object from Twitter API v2 with Tweepy version 4.12
I am streaming Tweets using Tweepy 4.12 and Twitter API v2.
I am only getting raw_data partial. How do I add rules to get full json object such as..
"country_code": "US",
"...
0
votes
1
answer
139
views
Python. TweepError: [{'code': 34, 'message': 'Sorry, that page does not exist.'}]
I want to run this code
def get_all_tweets(screen_name):
#initialize a list to hold all the tweepy Tweets
alltweets = []
#make initial request for most recent tweets (200 is the maximum allowed ...
0
votes
1
answer
457
views
Twitter API v2 filtered stream in Tweepy
I am attempting to make a filtered stream on Twitter API v2, using tweepy library.
Here is my code:
client = tweepy.StreamingClient(
bearer_token = "Bearer_Token"
)
client.add_rules(tweepy....
0
votes
0
answers
25
views
Should I use single Tweepy instance for multiple bots or create a new one for each?
I'm creating several Twitter bots using Tweepy. All of those run on the same account so the api keys and tokens are same.
Let's say one bot likes tweets. Another bot retweets tweets. Should I create a ...