Uploading images to Twitter with OAuth

I’m currently using Pathfix and Twitter OAuth, but I haven’t found a clear way to post a tweet with an image. Nor have I been able to find documentation. Uploading plain text is working perfectly, but the image part is what I’m stuck on.

Here is the scheduler:

In the workflow, I’m putting the value of the image uploader but I don’t think that’s right.

Then on the backend, I added the text, “Post to Twitter,” there is no option for “and” or “merge,” but it does allow me to add “Image to Tweet.” I really don’t think this is right either.

Then this is what shows up on Twitter:

I’ve been trying to figure this out for days, I’ve tried everything I can think of. Can someone help me with this?

Maybe add https in front of the dynamic expression for the image.

No, that doesn’t work.

I assume you have read through the docs

Assuming that is the case and my first suggestion didn’t work, I would suggest attempt to send a post without using dynamic data to figure out what format works and then adjust the dynamic data to match the required format.

1 Like

Sending a post without an image DOES work. I did read the docs. I’m sure it’s going to be something so simple in the long run that I just missed. Thanks.

I’m interested to know what it ends up being.

To add an image to a tweet you have to upload the image to twitter first with a call to the media endpoint and then include the returned media_id in the call to send the tweet. It’s a two step process.

So in Bubble you could use the api connector to post the image to https://upload.twitter.com/1.1/media/upload.json in your step 1 workflow, then in step 2 do another api call, this time to https://api.twitter.com/1.1/statuses/update.json but use the result of step 1 to include the media_id.

Pathfix doesn’t support posting images to Twitter yet. I ran into the same issue. Did you end up building a custom API call and figuring it out?