Shared media to be used when needed (like welcome message)


#1

Hi all, I need help regarding uploading media that can be shared so that it can be used again (like for welcome messages).

The documents says that in order for welcome messages to have media in it, the shared flag must be set. now I’ve tried it as a query parameter using my own implementation and using Twitter4J (the java library used for twitter) but it’s not working. So what is the right way to use it?

Also, is it a must to use chunk upload to set the shared parameter or can I use with the simple upload method (cause I thought that the problem that I’m not using chunk upload so I tried to use it but I can’t seem to upload media using the chunked upload method, I keep getting unauthorized 401 and I couldn’t find a java library that does oauth and chunked media upload according to the docs).

And a final question, does shared media expire? I mean do I need to redfined a welcome message once the shared image expires?

Note:
I couldn’t find a working code related to media attachment in the webhook nodejs project on github. I think it will be much appreciated if an example is provided to help us.

Many Thanks.