Freelance Developer — X (Twitter) OAuth Follow-Gate Feature
Budget: $750 – $1,500 AUD
BetAI is an AI-powered sports analytics platform (answer questions like ChatGPT). We're growing fast and need to build a key user-acquisition feature.
Once a visitor submits their second question, an interstitial modal must pop up asking them to follow @BetAIplatform on X. The answer to their pending question stays hidden until the follow is confirmed through the X (formerly Twitter) API.
Here is the exact flow I need implemented in PHP:
• Listen for the second question event in the current Q&A script.
• Render a responsive modal overlay that contains a clear “Follow @BetAIplatform” button and a note explaining that the answer unlocks after verification.
• Upon click, trigger X OAuth so the user logs in (or authorises if already logged in) and follows the account.
• Call the X API to verify the follow in real time; handle edge cases where the user closes the window, denies access, or unfollows before verification completes.
• Once the account-follow is confirmed, dismiss the modal and automatically reveal the stored answer without refreshing the page.
• Gracefully handle API errors or rate limits with friendly fallback messaging.
You have complete freedom on the modal’s front-end layer (vanilla JS, jQuery, or a lightweight framework), but the core logic and API handshake must live in clean, well-documented PHP so I can slot it into the existing codebase.
Deliverables
• PHP class or set of functions that manage OAuth, follow verification, and error handling.
• Front-end modal code and minimal CSS.
• README with setup steps, X developer portal instructions, and any required environment variables.
• Short video or GIF showing the flow working on a local build.
Acceptance is based on: seamless modal trigger after the second question, successful follow detection via live API call, immediate answer reveal, and reliable error paths.
If you’ve built social gating or OAuth integrations before, this should be easy; I’m ready to share access tokens and a staging URL as soon as we start.
Once a visitor submits their second question, an interstitial modal must pop up asking them to follow @BetAIplatform on X. The answer to their pending question stays hidden until the follow is confirmed through the X (formerly Twitter) API.
Here is the exact flow I need implemented in PHP:
• Listen for the second question event in the current Q&A script.
• Render a responsive modal overlay that contains a clear “Follow @BetAIplatform” button and a note explaining that the answer unlocks after verification.
• Upon click, trigger X OAuth so the user logs in (or authorises if already logged in) and follows the account.
• Call the X API to verify the follow in real time; handle edge cases where the user closes the window, denies access, or unfollows before verification completes.
• Once the account-follow is confirmed, dismiss the modal and automatically reveal the stored answer without refreshing the page.
• Gracefully handle API errors or rate limits with friendly fallback messaging.
You have complete freedom on the modal’s front-end layer (vanilla JS, jQuery, or a lightweight framework), but the core logic and API handshake must live in clean, well-documented PHP so I can slot it into the existing codebase.
Deliverables
• PHP class or set of functions that manage OAuth, follow verification, and error handling.
• Front-end modal code and minimal CSS.
• README with setup steps, X developer portal instructions, and any required environment variables.
• Short video or GIF showing the flow working on a local build.
Acceptance is based on: seamless modal trigger after the second question, successful follow detection via live API call, immediate answer reveal, and reliable error paths.
If you’ve built social gating or OAuth integrations before, this should be easy; I’m ready to share access tokens and a staging URL as soon as we start.
Related categories:
PHP
JavaScript
HTML5
HTML
OAuth
Web Development
API
Frontend Development
jQuery
API Development