{"id":23762044,"url":"https://github.com/sameer266/bots_news_post_fb","last_synced_at":"2025-06-29T16:37:31.744Z","repository":{"id":250544245,"uuid":"834758958","full_name":"sameer266/bots_news_post_fb","owner":"sameer266","description":"This  is a bot that post a news  in my facebook page in every 3hrs","archived":false,"fork":false,"pushed_at":"2024-07-31T18:18:41.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-25T07:07:30.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameer266.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-28T09:18:30.000Z","updated_at":"2024-07-31T18:18:44.000Z","dependencies_parsed_at":"2024-07-31T22:19:32.850Z","dependency_job_id":null,"html_url":"https://github.com/sameer266/bots_news_post_fb","commit_stats":null,"previous_names":["sameer266/bots_news_post_fb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sameer266/bots_news_post_fb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbots_news_post_fb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbots_news_post_fb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbots_news_post_fb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbots_news_post_fb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameer266","download_url":"https://codeload.github.com/sameer266/bots_news_post_fb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbots_news_post_fb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262627911,"owners_count":23339690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T21:16:11.837Z","updated_at":"2025-06-29T16:37:31.714Z","avatar_url":"https://github.com/sameer266.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django News Bot\n\nThis project is a Python-based bot that fetches the latest news articles from Nepal and posts them to Facebook every 3 hours using GitHub Actions. It leverages the NewsData API for retrieving news articles and the Facebook Graph API for posting updates.\n\n## Features\n\n- Fetches the latest news articles from Nepal.\n- Posts news updates to Facebook every 3 hours.\n- Automated scheduling using GitHub Actions.\n- Easy setup and deployment with GitHub.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- You have a GitHub account.\n- You have an API key from [NewsData.io](https://newsdata.io/).\n- You have a Facebook access token from the [Facebook Graph API](https://developers.facebook.com/docs/graph-api).\n\n## Installation\n\n1. **Clone the Repository**:\n\n    ```bash\n    git clone https://github.com/your-username/django-news-bot.git\n    cd django-news-bot\n    ```\n\n2. **Create and activate a virtual environment** (optional but recommended):\n\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n    ```\n\n3. **Install Dependencies**:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n## Configuration\n\n1. **Add your API keys to GitHub Secrets**:\n\n    - Go to your GitHub repository.\n    - Navigate to `Settings` \u003e `Secrets and variables` \u003e `Actions`.\n    - Add the following secrets:\n        - `NEWS_API_KEY` with your NewsData API key.\n        - `FACEBOOK_ACCESS_TOKEN` with your Facebook access token.\n\n## Usage\n\n1. **GitHub Actions Workflow**:\n\n    The GitHub Actions workflow is defined in `.github/workflows/schedule.yml`. It is set to run every 3 hours and post the latest news to Facebook.\n\n    ```yaml\n    name: Post News to Facebook\n\n    on:\n      schedule:\n        - cron: '0 */3 * * *' # This runs every 3 hours\n      workflow_dispatch:\n\n    jobs:\n      post_news:\n        runs-on: ubuntu-latest\n\n        steps:\n        - name: Checkout repository\n          uses: actions/checkout@v2\n\n        - name: Set up Python\n          uses: actions/setup-python@v2\n          with:\n            python-version: '3.x'\n\n        - name: Install dependencies\n          run: |\n            python -m pip install --upgrade pip\n            pip install -r requirements.txt\n\n        - name: Run script\n          env:\n            NEWS_API_KEY: ${{ secrets.NEWS_API_KEY }}\n            FACEBOOK_ACCESS_TOKEN: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}\n          run: |\n            python logo.py\n    ```\n\n2. **Run Locally** (optional):\n\n    You can also run the script locally for testing purposes:\n\n    ```bash\n    python logo.py\n    ```\n\n## Contributing\n\nIf you have suggestions for improving this project, please open an issue or fork the repository and submit a pull request. Contributions are always welcome!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- [NewsData.io](https://newsdata.io/) for the news API.\n- [Facebook Graph API](https://developers.facebook.com/docs/graph-api) for enabling automated posts.\n- [GitHub Actions](https://github.com/features/actions) for providing continuous integration and automation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer266%2Fbots_news_post_fb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameer266%2Fbots_news_post_fb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer266%2Fbots_news_post_fb/lists"}