louisgrasset / touitomamout

Touitomamout is an easy way to synchronize your Twitter's tweets 🦤 to Mastodon 🦣 and Bluesky post ☁️ (also known as Twitter to Mastodon & Bluesky crossposter)
https://hub.docker.com/r/louisgrasset/touitomamout
GNU Affero General Public License v3.0
199 stars 10 forks source link

feat: provide link metadata to bluesky post if any #122

Closed kai17 closed 1 year ago

kai17 commented 1 year ago

Many sites define social media "cards" using tags like

<meta name="twitter:card" content="summary"></meta>

When I post a link to such a site on twitter, an image/summary are attached. This attachment does not carry over to Bluesky.

Compare these posts

https://twitter.com/kai_arzheimer/status/1722587507693351295 https://bsky.app/profile/kaiarzheimer.bsky.social/post/3kdqxizx5ra2m

I suspect this is because Bluesky (at least on the web) requires an extra click to confirm that one wants to attach the card. It would be great if this confirmation could be given via the API by the script.

louisgrasset commented 1 year ago

Good catch! I'll have a look

mcleinn commented 1 year ago

I needed the same feature and I added a quick fix in a fork, together with video previews: https://github.com/louisgrasset/touitomamout/compare/main...mcleinn:touitomamout-bskyvid:main

But this is only a quick and dirty solution, if you have time then better wait until @louisgrasset adds the feature to the main repository

preview
louisgrasset commented 1 year ago

I started yesterday to implement the link metadata retrieval to inject them in the bluesky post (if it's not a quote nor have media). Each post will be trying to create a card if it has a link

kai17 commented 1 year ago

Thank you, that's great! Not a programmer, so all I can contribute to this wonderful program is bug reports and ideas for new features ;-)

Professor of Politics Department of Political Science / University of Mainz http://www.kai-arzheimer.com / http://twitter.com/kai_arzheimer

On Mon, 13 Nov 2023 at 14:17, Louis Grasset @.***> wrote:

I started yesterday to implement the link metadata retrieval to inject them in the bluesky post (if it's not a quote nor have media). Each post will be trying to create a card if it has a link

— Reply to this email directly, view it on GitHub https://github.com/louisgrasset/touitomamout/issues/122#issuecomment-1808148764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUVF2HBZRLJ5NUKWD7D5VLYEIMXDAVCNFSM6AAAAAA7ER32FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGE2DQNZWGQ . You are receiving this because you authored the thread.Message ID: @.***>

mcleinn commented 1 year ago

Great. Please note that I ran into issues if the indicated preview picture (og:image) is bigger than 975 kB or so. That especially happens when the og:image is a png. It will fail to upload to Bluesky with an error ("BlobTooLarge") So either you need to ignore the image, choose another one (risky) or scale it down (I am using "sharp" module for that). Also I chose to remove the link from the post afterwards, so not to generate unnecessary chunks - but that is a matter of choice.

louisgrasset commented 1 year ago

Compression work is started, but I'll not merge it with card management.