When user clicks “Share on Twitter” button on my site, I’d like to prepopulate that tweet with an image (let’s assume that image is served from my server). It would be great if I could do it with Twitter’s web intent, but that’s apparently not possible: Tweet intent with image
So I guess for this to work I’d need to have some server as middleman between the client running my API and Twitter’s oAuth provider?
Is there any service that you could recommend that takes care of it - I found about oAuth.io, I guess they act as a described middleman?
The third possible approach I found would be via Twitter Cards. Is it possible to make it work since I dynamically generate the content via AJAX calls? This lit a beam of hope in me, but I’m not totally sure what it means yet: Crawler AJAX/escaped fragment support?
My actual situation: I’m developing an Angular app that displays Highcharts charts and I’d like my users to be able to share their screenshots. My current high-level idea is: Highcharts’ export feature sends request to their server to generate the image, it creates an image and serves it there for 30 seconds - and I’m given it’s link in a callback on client.
Now I can store that image somewhere else (my or Twitter’s server?) and then we come to the problem described above.
I’d be grateful on any advice how to do this in a most elegant way that would also be as frictionless as possible for the users. (e.g. oAuth require that they authorize the app to post on their behalf)