Skip to content

Shefali social x poster#1297

Closed
SMitta11 wants to merge 22 commits into
developmentfrom
Shefali_Social_X_Poster
Closed

Shefali social x poster#1297
SMitta11 wants to merge 22 commits into
developmentfrom
Shefali_Social_X_Poster

Conversation

@SMitta11
Copy link
Copy Markdown

@SMitta11 SMitta11 commented Mar 30, 2025

Description

This PR adds API endpoints for posting content on Twitter, scheduling the content for posting on Twitter, Read , update and delete API for posted content.
(Image functionality in backend is working but while scheduling tweet, image is not showing at frontend, add this functionality at frontend)

Related PRS (if any):

To test this backend PR you need to checkout the #3344 frontend PR.
Video of functionality attached in frontend PR.

Main changes explained:

  • Updated socialMediaController.js where all the functions for posting, scheduling, reading, updating and deleting tweets are defined.
  • Created socialPostScheduler.js which is a cron job which runs every minute to post the scheduled tweets on Twitter.
  • Created scheduledPostSchema.js where defined mongoDB schema to define scheduled posts.
  • Created socialMediaRouter.js where /post API endpoint defined with POST, GET, DELETE and PUT methods.
  • Updated routes.js: Integrated the new socialMediaRouter within the main app router configuration to expose the new API endpoints.

How to test:

  1. check into current branch
  2. do npm install and npm run dev to run this PR locally

Note:

Need to add below functionalities:

  1. Check for character limit in main page(280 characters) and remove this check for images
  2. If user adds image then add that image in front end as it is not showing right now.

For Twitter Developer Account Setup

  • Apply for a Developer Account: Go to the Twitter Developer Platform.
  • Once approved, navigate to the Developer Portal.
  • Create a new project and then an app within that project.
  • Under “User authentication settings,” set the App permissions to “Read and Write.”
  • Set the Callback URI to http://localhost:3000 or your application’s URL.
  • Set them as environment variables in your application (.env file):
    Twitter:
    REACT_APP_TWITTER_CLIENT_ID
    REACT_APP_TWITTER_CLIENT_SECRET
    REACT_APP_TWITTER_APP_KEY
    REACT_APP_TWITTER_APP_SECRET
    REACT_APP_TWITTER_ACCESS_TOKEN
    REACT_APP_TWITTER_ACCESS_SECRET

@one-community one-community added the Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. label May 18, 2025
@one-community
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants