Hi all,
I have been trying to publish an image with API with Postman, then i tried with the package twit for NodeJS, now with twurl.
In all three cases I used the chunked upload.
In all three cases I got a good response but no image will show on my profile.
What I did:
twurl authorize \
--consumer-key key \
--consumer-secret secret
...
Authorization successful
The INIT
twurl -H upload.twitter.com "/1.1/media/upload.json" \
-d "command=INIT&media_type=image/png&total_bytes=4015"
The response
{
"media_id":13225blabla,
"media_id_string":"13225blabla",
"expires_after_secs":86400
}
The APPEND
twurl -H upload.twitter.com "/1.1/media/upload.json" \
-d "command=APPEND&media_id=13225blabla&segment_index=0" \
--file hi.png \
--file-field "media"
Response empty as it should be.
The FINALIZE
twurl -H upload.twitter.com "/1.1/media/upload.json" \
-d "command=FINALIZE&media_id=13225blabla"
The response
{
"media_id":13225blabla,
"media_id_string":"13225blabla",
"size":3923,
"expires_after_secs":86400,
"image":{"image_type":"image\/jpeg","w":300,"h":179}
}
It should be fine but if I go to see in my profile no image is showed.
What can I do?
After uploading the image, you then need to post a tweet with the image POST statuses/update | Docs | Twitter Developer Platform - just uploading it does not make it appear anywhere.
2 Likes
system
Closed
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.