Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kai17 opened this issue Nov 9, 2023 · 6 comments · Fixed by #131
Closed

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

kai17 opened this issue Nov 9, 2023 · 6 comments · Fixed by #131

Comments

@kai17
Copy link

kai17 commented Nov 9, 2023

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
Copy link
Owner

Good catch! I'll have a look

@mcleinn
Copy link

mcleinn commented Nov 12, 2023

I needed the same feature and I added a quick fix in a fork, together with video previews: 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
Copy link
Owner

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

@louisgrasset louisgrasset changed the title Tweets' attachments are not copied over to Bluesky provide link metadata to bluesky post if any Nov 13, 2023
@louisgrasset louisgrasset changed the title provide link metadata to bluesky post if any feat: provide link metadata to bluesky post if any Nov 13, 2023
@kai17
Copy link
Author

kai17 commented Nov 13, 2023 via email

@mcleinn
Copy link

mcleinn commented Nov 13, 2023

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants