This project fetches the most recent tweets from @CUSocialMedia using the X API, formats them into an RSS feed, and displays them on our CampusPress Social Media Lab site using the RSS Just Better plugin, styled with custom CSS and JavaScript. It is displayed here: https://socialmedialab.cornell.edu/news/
X's current privacy policies requires users to log in to X to see tweets. Hence, when we embed the @CUSocialMedia X timeline (via Twitter Publish), the displayed timeline says "No Posts to Show", or entirely disappears.
Use the X API to fetch the most recent tweets, format them into an RSS feed, and display them on our WordPress site using the RSS Just Better plugin, styled with custom CSS and JavaScript. It is displayed here: https://socialmedialab.cornell.edu/news/
- π A Python script
scripts/generate_rss.pyretrieves the 10 most recent tweets via the X API. - π Tweets are converted into a styled RSS feed XML file https://cornellsml.github.io/sml-tweets-cache/feeds/cusocialmedia_rss.xml.
- π The XML file is hosted on GitHub Pages.
- π A GitHub Actions cron job
.github/workflows/update-rss.ymlruns the script every 3 days. - π₯ On CampusPress (WordPress), the RSS feed is displayed using:
- The RSS Just Better plugin
- Custom CSS (WordPress
Advanced Settings β Custom Code β Footer Code) for styling - Custom JavaScript (WordPress
Appearance β Custom CSS) for enhanced interaction