Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angela - Pinterest Poster #1155

Open
wants to merge 14 commits into
base: development
Choose a base branch
from

Conversation

angelalalacheng
Copy link
Contributor

Description

This PR adds API endpoints for posting content on Pinterest, enabling image extraction and posting capabilities (note: scheduling is not included in this PR). Currently, there are no related frontend PRs, as frontend development for these features is still in progress. Once the frontend is ready, these APIs will be integrated to complete the functionality.

Main changes explained:

  • Created socialMediaController.js:
    • Extract text and image URLs or base64 content from content.
    • Post images to Pinterest using createPin.
    • Handle token retrieval for Pinterest OAuth authentication.
  • Created socialMediaRouter.js: Defines routes to handle Pinterest API interactions, including posting images and obtaining access tokens.
  • 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
  3. Access the endpoints:
  • /api/getPinterestAccessToken - Test Pinterest token retrieval.
  • /api/createPin - Test Pinterest posting functionality with sample data.

Screenshots or videos of changes (Just temporary UI):

https://www.loom.com/share/e41dadeae7334dc9a20a1adff8b4b3fc?sid=ef77017e-d178-44b7-ba45-9d2105576708

Note:

  1. Pinterest Business Account:
  1. Set them as environment variables in your application (.env file):

Pinterest:

  • REACT_APP_PINTEREST_CLIENT_ID
  • REACT_APP_PINTEREST_CLIENT_SECRET

@angelalalacheng angelalalacheng added Do Not Review Do not review or look at code without full context DO NOT MERGE Don't merge PR labels Nov 18, 2024
@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 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Don't merge PR Do Not Review Do not review or look at code without full context 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.

2 participants