A Python application that automatically publishes new blog posts from an RSS feed to various social media platforms (Twitter, Facebook, Telegram, and LinkedIn).
- Python 3.7 or higher
- RSS feed URL of your blog
- Social media API credentials:
- Twitter Developer Account
- Facebook Developer Account
- LinkedIn Developer Account
- Clone this repository:
git clone https://github.com/AIArabicProjects/manshar.git
cd manshar- Install the required dependencies:
pip install -r requirements.txt- Copy the
config.yaml.examplefile toconfig.yamland fill in your credentials:
cp config.yaml.example config.yaml- Edit the
config.yamlfile with your API credentials and RSS feed URL.
Run the application for regular article posting:
python main.pyFacebook access tokens expire periodically (typically after 60 days). When your token expires, you'll need to renew it to continue posting to Facebook.
The script will:
- Exchange your current token for a new long-lived token
- Check if the token is a User or Page token
- Display the new token and its expiration details
- Show which Facebook pages are accessible with this token
python scripts/renew_fb_token.pyAfter running the script, you'll see output like:
✅ New long-lived user token: EAAxxxxxxxxxxxxx...
✅ Page Access Token: EAAyyyyyyyyyyyyyy...
Copy the appropriate token and update your config.yaml file:
facebook:
access_token: YOUR_NEW_TOKEN_HEREThe application logs all activities to the console with timestamps. You can monitor the application's activity and troubleshoot any issues through these logs.
Feel free to submit issues and enhancement requests!
