twitter-together / action

:bird: A GitHub action to tweet from a repository

Home Page:https://github.com/marketplace/actions/twitter-together

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retweet functionality

erickzhao opened this issue · comments

What’s missing?

I'd like to add the ability to retweet tweets. Twitter API has a statuses/retweet/:id API that could be used in conjunction with a .retweet file.

N.B. I would be willing to take a stab at working on this!

Why?

We've decided to try out Twitter Together for the @electron Twitter account so that the working group responsible for social media can have a formal process for Tweets.

A non-negligible part of our Tweets are straight retweets from other accounts, and we'd like to use the same flow for RTs as well.

Alternatives you tried

Quote-tweeting everything is an alternative, but not always the best solution.

🎉 excited that the Electron team would like to give it a try!

Retweeting is definitely within the scope of twitter-together 👍

Looking at the API, there does not seem to be a dedicated API endpoint for quote-tweeting. I guess you just insert the URL of the tweet you are quoting in the *.tweet file?

I was thinking to use the old-school RT [tweet URL] syntax and the same .tweet file extension instead of introducing a new one. But I'd be okay either way. Using .retweet might be a cleaner implementation, as the retweet feature cannot be combined with text or attachments.

Can you get a pull request with a test going? We would need to implement

  1. Preview feature for the retweet (for pull_request events)
  2. The actual retweet logic (for push events)

Sounds good to me!

Looking at the API, there does not seem to be a dedicated API endpoint for quote-tweeting. I guess you just insert the URL of the tweet you are quoting in the *.tweet file?

Yep, only downside is having the URL count towards your 280 character count, it seems.

the URL count towards your 280 character count

No that should not be a problem, I use a library to parse the raw twitter text, to get the character count the way twitter counts it

Looking at the API, there does not seem to be a dedicated API endpoint for quote-tweeting. I guess you just insert the URL of the tweet you are quoting in the *.tweet file?

I'm fairly confident this is how twitter natively handles quote tweets, they just hide it in the UI afaik. They may make an exception if you explicitly click "quote tweet" in the UI and then just append the extra characters.

Additionally, for the last half-decade or so all URLs are considered to be the same length since they convert them to their own shortener and then display the 'real' URL :)

Using .retweet might be a cleaner implementation, as the retweet feature cannot be combined with text or attachments.

This feels like the preferable approach to me ❤️

I'm part of hapiJS core team and we're interested in the retweet feature too. Where are you standing on this feature? Did you get something working @bnb? Do we actually need something to be developed here or does it work by just pasting the tweet URL in your .tweet file as you mentioned?

Hi @Nargonath, I think the status is that yes, we want an RT feature, but no, you cannot just create a .tweet file with a tweet URL in it.

I think what I'd suggest we do is to introduce frontmatter similar to what Jekyll does, that way we can add meta data to .tweet files, which would allow us to do all kind of things. See also the discussions at

Example

---
retweet: https://twitter.com/coderefine/status/1311044915602903043
---

Optional tweet text here. If present, it will be a quote-tweet, otherwise a retweet.

I don't have the time do work on this now myself, but I can collaborate on a pull request, if someone else would like to drive it.

+1 to @gr2m's suggestion. I've not had time to work on this myself.

Alright, thank you both for the information. I'll add this to my TODO list. 😉