<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji" -->

---
title: How We Share Foojay Posts on Social Media | daily.dev
description: Foojay automates social media announcements for new articles with a single JBang-run Java file called SocialPosts.java. The script compares RSS feeds before...
canonical: https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How We Share Foojay Posts on Social Media | daily.dev
og:description: Foojay automates social media announcements for new articles with a single JBang-run Java file called SocialPosts.java. The script compares RSS feeds before...
og:url: https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji
og:image: https://api.daily.dev/og/posts/Yt22eXxjI.png
og:image:alt: How We Share Foojay Posts on Social Media
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How We Share Foojay Posts on Social Media

**[Foojay.io](https://daily.dev/sources/foojayio)** · 7 min read · 0 upvotes · 1 comments

## Summary

Foojay automates social media announcements for new articles with a single JBang-run Java file called SocialPosts.java. The script compares RSS feeds before and after each deploy to detect new articles, then asks Claude to draft a post per platform. Mastodon and Bluesky get posted directly, while LinkedIn text goes to Slack since the script has no API it can use for a company page. The script handles author mentions, character limits (500 for Mastodon, 300 for Bluesky), and preview images, scaling images down when Bluesky's roughly 1MB limit is exceeded. It needs Java 17 plus jsoup and Jackson, and caps itself at five new articles per run.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/how-we-share-foojay-posts-on-social-media>

## Questions this post answers

### How can I post to Bluesky programmatically with a clickable link preview card?

Bluesky does not auto-generate a preview card from a URL the way Mastodon does, so you must read the title, description and image from the page's og: tags yourself, upload the image, and attach the card to the post manually. Bluesky also rejects images around 1 MB, so the image needs to be scaled down and its JPEG quality lowered step by step until it fits.

_Developers wiring up Bluesky previews can find more implementation write-ups like this on daily.dev._

### How do Mastodon and Bluesky count characters differently for link posts?

Mastodon counts every link as exactly 23 characters no matter how long the actual URL is, while Bluesky shows a shortened link and counts that shortened version instead. This matters when generating post text with a language model, since counting must be done programmatically per platform rather than trusting the model's own character count.

_Anyone automating cross-platform posts can track platform quirks like this via daily.dev._

### Why can't I post directly to a LinkedIn company page through an API in an automated workflow?

LinkedIn provides no usable API for posting to a company page in this kind of workflow, so the alternative is sending the drafted text to a Slack channel along with a link that opens the LinkedIn composer pre-filled with that text, requiring one manual click to select the author's profile and publish.

_Developers hitting LinkedIn API limits in their automation can compare workarounds on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@demovexa** · 0 upvotes

> Comparing the RSS feed before and after the deploy is a clean way to avoid storing state. One thing I'd add for LinkedIn: it caches the link preview the first time a URL is shared, so if the og:image or description was wrong when the page went live, the old card keeps showing. Running the article URL through LinkedIn's Post Inspector before opening the composer makes it fetch the page again. And since every network uses the same 16:9 preview image, a check in your validators that fails when an article has no og:image would catch a missing card before any post goes out.

## Similar posts on daily.dev

- [The New Foojay.io: Generated by Hugo, Maintained by Java · webtechie.be](https://daily.dev/posts/the-new-foojay-io-generated-by-hugo-maintained-by-java-webtechie-be-zm5y56oyr) · WebTechie · 10 upvotes · 1 comments
- [Foojay Podcast \#94: More Than a Blog: How Foojay Connects, Sustains, and Evolves the Java Community](https://daily.dev/posts/foojay-podcast-94-more-than-a-blog-how-foojay-connects-sustains-and-evolves-the-java-community-hdgnku2hf) · Foojay.io · 0 upvotes · 0 comments
- [How I Automated Multi-Platform Social Posting With Claude and n8n \(And Stopped Logging Into 5 Dashboards Every Morning\)](https://daily.dev/posts/how-i-automated-multi-platform-social-posting-with-claude-and-n8n-and-stopped-logging-into-5-dashbo-iiu2dyngx) · SitePoint · 1 upvotes · 0 comments
- [Social Media Engagement: summer 2026](https://daily.dev/posts/social-media-engagement-summer-2026-sxkqx9bie) · Martin Fowler · 0 upvotes · 0 comments
- [Featured Foojay Authors for October 2026: Bazlur Rahman and Nicolas Fränkel](https://daily.dev/posts/featured-foojay-authors-for-october-2026-bazlur-rahman-and-nicolas-fr-nkel-jinuikxpr) · Foojay.io · 0 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#automation](https://daily.dev/tags/automation), [#claude](https://daily.dev/tags/claude), [#github-actions](https://daily.dev/tags/github-actions)

[View this post on daily.dev](https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How We Share Foojay Posts on Social Media","url":"https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji"},"datePublished":"2026-10-29T01:28:14.307Z","dateModified":"2026-10-29T01:28:42.924Z","description":"Foojay automates social media announcements for new articles with a single JBang-run Java file called SocialPosts.java. The script compares RSS feeds before...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/832c4368ac3884ead7a59d8e65435489?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/832c4368ac3884ead7a59d8e65435489?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Foojay.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Foojay.io","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1820f6a6ae944760aa322b67ed85f848","url":"https://daily.dev/sources/foojayio"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"java,automation,claude,github-actions","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Foojay.io","item":"https://daily.dev/sources/foojayio"},{"@type":"ListItem","position":3,"name":"How We Share Foojay Posts on Social Media"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji","comment":[{"@type":"Comment","text":"Comparing the RSS feed before and after the deploy is a clean way to avoid storing state. One thing I’d add for LinkedIn: it caches the link preview the first time a URL is shared, so if the og:image or description was wrong when the page went live, the old card keeps showing. Running the article URL through LinkedIn’s Post Inspector before opening the composer makes it fetch the page again. And since every network uses the same 16:9 preview image, a check in your validators that fails when an article has no og:image would catch a missing card before any post goes out.","datePublished":"2026-10-29T02:57:07.760Z","url":"https://daily.dev/posts/Yt22eXxjI#c-nEEaFWuIR","author":{"@type":"Person","name":"DemoVexa","url":"https://daily.dev/demovexa","image":"https://media.daily.dev/image/upload/s--I0Ym8soj--/f_auto,pg_1/v1792077531/avatars/avatar_F6wD6jMSPjwEMcztjwnyE?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-we-share-foojay-posts-on-social-media-yt22exxji#faq","mainEntity":[{"@type":"Question","name":"How can I post to Bluesky programmatically with a clickable link preview card?","acceptedAnswer":{"@type":"Answer","text":"Bluesky does not auto-generate a preview card from a URL the way Mastodon does, so you must read the title, description and image from the page's og: tags yourself, upload the image, and attach the card to the post manually. Bluesky also rejects images around 1 MB, so the image needs to be scaled down and its JPEG quality lowered step by step until it fits. Developers wiring up Bluesky previews can find more implementation write-ups like this on daily.dev."}},{"@type":"Question","name":"How do Mastodon and Bluesky count characters differently for link posts?","acceptedAnswer":{"@type":"Answer","text":"Mastodon counts every link as exactly 23 characters no matter how long the actual URL is, while Bluesky shows a shortened link and counts that shortened version instead. This matters when generating post text with a language model, since counting must be done programmatically per platform rather than trusting the model's own character count. Anyone automating cross-platform posts can track platform quirks like this via daily.dev."}},{"@type":"Question","name":"Why can't I post directly to a LinkedIn company page through an API in an automated workflow?","acceptedAnswer":{"@type":"Answer","text":"LinkedIn provides no usable API for posting to a company page in this kind of workflow, so the alternative is sending the drafted text to a Slack channel along with a link that opens the LinkedIn composer pre-filled with that text, requiring one manual click to select the author's profile and publish. Developers hitting LinkedIn API limits in their automation can compare workarounds on daily.dev."}}]}
```

