Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.
socialMediaRouter.js
: Defines routes to handle Pinterest API interactions, including posting images and obtaining access tokens.routes.js
: Integrated the new socialMediaRouter within the main app router configuration to expose the new API endpoints.How to test:
npm install
andnpm run dev
to run this PR locallyScreenshots or videos of changes (Just temporary UI):
https://www.loom.com/share/e41dadeae7334dc9a20a1adff8b4b3fc?sid=ef77017e-d178-44b7-ba45-9d2105576708
Note:
Pinterest: