Comments (8)
I see one thing you are doing wrong. The 'tweets' request, by default uses HTTP GET. You need to use HTTP POST in order to upload a tweet. Try this...
r = api.request('tweets', {'text':'a test to test'}, method_override='POST')
from twitterapi.
Looks good to me. Are you using the same credentials with Postman and TwitterAPI?
I would add something to your code to confirm that your credentials are valid.
from twitterapi.
Yes, I'm using the same exact credentials with Postman and TwitterAPI.
What code do I need to add that check my credentials are valid?
from twitterapi.
You could try other enpoints, such as searching for tweets, that don't require write privileges. I'm really not sure what to tell you. It doesn't make sense that the same credentials would would work in one case and not in the other. Are those credentials associated with a Twitter developer project?
from twitterapi.
The error you are receiving is from Twitter, so it's impossible to for me to look into the cause. There must be some difference between your requests in Postman and in TwitterAPI. It might be helpful to try the same request using another library such as twarc.
from twitterapi.
I see one thing you are doing wrong. The 'tweets' request, by default uses HTTP GET. You need to use HTTP POST in order to upload a tweet. Try this...
r = api.request('tweets', {'text':'a test to test'}, method_override='POST')
method_override='POST'
Thank you! Problem fixed
from twitterapi.
from twitterapi.
api = TwitterAPI(consumer_key, consumer_secret, access_key, access_secret, api_version='2')
from twitterapi.
Related Issues (20)
- Wrong documentation version on gh-pages HOT 1
- No includes in _RestIterable response without hydration
- lang filtering does not seem to work HOT 1
- Attempting to pull more than 10 tweets with search/tweets HOT 1
- Question: how do I acquire `screen_name` using `author_id`?? HOT 1
- DM Example not working HOT 2
- gracefully handling a stalled stream HOT 51
- Upgrade Ads API to version 10 - Deadline March 31, 2022
- Bearer Token Issue with Academic Access in Twitter API V2 HOT 1
- SUBSCRIPTION ENDPOINT NOT WORKING HOT 2
- `expansions` does not work with `author_id` HOT 2
- Twitter Ads API version 10 deprecation - End of life date September 29, 2022
- Add support for `/users/:id/bookmarks` endpoint
- Add support for OAuth2 authentication with access_tokens HOT 1
- Not able to create Webhook with Twitter HOT 2
- Request method fails to attach additional metadata HOT 2
- Can't attach media V2 HOT 2
- Publish Tweets w/ v2 HOT 3
- OP_NO_TICKET SSL Option no longer supported by Twitter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitterapi.