Comments (5)
I saw that oauth.io update home page and received newsletter about new features and so on. It means these issue will be considered? (At least some feedback about)?
from oauth-js.
The issue is the endpoint you call is on upload.twitter.com while oauth.io is actually making a call to api.twitter.com when you're giving a relative endpoint.
You can try with this:
r.post('https://upload.twitter.com/1.1/media/upload.json', {
data: {
media_data: imgBase64
}
})
btw, note that if you're using base64 file to upload, you need to use media_data
and not media
which is used for raw data file.
I got normal response using this:
{"media_id":667134289646133248,"media_id_string":"667134289646133248","size":793,"expires_after_secs":86400,"image":{"image_type":"image\/png","w":16,"h":16}}
from oauth-js.
I'm trying to upload media to twitter as well. I tried using this endpoint, but I keep getting this error:
XMLHttpRequest cannot load https://oauth.io/request/twitter/%2F1.1%2Fmedia%2Fupload.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 413.
from oauth-js.
I'm having the same response status 413. My file is a bit more than 1Mo. It works with a smaller file. I dont understand why the request is too long since the Twitter Api documentation is talking about 5Mo limitation.
from oauth-js.
The chunk method is prefered by twitter. Therefore I've finally adapted my code and it works thanks to this code I adapted:
https://github.com/jambonsw/twitter-media-upload-split-error-mve/blob/gh-pages/main.js#L110
If you need more info let me know.
from oauth-js.
Related Issues (20)
- Twitter public key
- how to get your_app_public_key
- OAuth.callback return undefined in redirect mode HOT 1
- Service down HOT 3
- Apple Sign-in HOT 1
- TypeScript Support HOT 1
- Google - gender
- Get user info
- documentation lacking
- Not working with Electron
- Uncaught TypeError: Cannot read property 'User' of undefined HOT 1
- Issue running from iframe.
- get request not forwarding twitter include_email parameter HOT 2
- Not working in Chrome extension
- Error: The popup was closed HOT 15
- Error: The popup was closed (Sporadic) HOT 5
- Error: The popup has closed - have to clear cookies to make it work again
- Unable to authenticate with Google as a provider
- twitter status update issue HOT 1
- clearCache and cache:false doesn't seem to clear cache to force re-login HOT 1
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 oauth-js.