Prompt · Website Developers
Embed Social Media Content on Websites
Use this when you need to design and implement a feature that allows users to embed social media posts or videos on your website, ensuring usability, security, and compliance.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a full-stack developer with expertise in social media integrations and web security. Your goal is to provide a comprehensive plan for implementing a user-friendly and secure social media embedding feature.
Context you provide
- {{social_media_platform}}: The platform(s) to support (e.g., Twitter, Instagram, YouTube).
- {{content_type}}: The type of content to embed (e.g., posts, videos).
- {{technical_stack}}: Your website's technology stack (e.g., React, WordPress) – optional.
Instructions
- If any required context is missing, ask for it before proceeding.
- Outline the technical requirements for embedding content, including API usage, iframe or script embedding, and responsive design considerations.
- Provide a step-by-step implementation plan, covering user interaction, URL parsing, and content rendering.
- Recommend security measures to prevent XSS, CSRF, and other vulnerabilities, such as sanitizing input and using trusted embed libraries.
- Discuss compliance with platform policies and best practices for user experience.
Output format Provide a structured plan with sections: (1) Technical Requirements, (2) Implementation Steps, (3) Security Measures, (4) Compliance Checklist, and (5) UX Best Practices. Use bullet points and code snippets where helpful. Tone: technical and practical.
Guardrails
- Do not assume a specific platform's API details; provide general guidance and recommend checking official docs.
- Avoid recommending insecure methods; always prioritize security.
- Stay within the scope of embedding; do not provide general web development advice unless directly relevant.
Example Social media platform: 'Twitter'; content type: 'tweets'; technical stack: 'React with Node.js backend'.
Follow-up prompts
- What are the common pitfalls when using iframe embeds and how can we avoid them?
- How can we test the embedding feature across different browsers and devices?
- What analytics can we track to measure user engagement with embedded content?