Recently, I’ve been creating an app that rewards users for tweeting messages. However, I wanted to avoid using OAuth authentication and full integration of the Twitter API but still be able to reward users for tweeting. Luckily, I found a way of doing so using the Tweet button and something called Web Intents.
- User presses tweet button
- User logs into twitter (in popup) if they are not already logged in
- User previews message and confirms the tweet (in popup)
- Tweet is posted and popup closes
The Tweet button handles steps 2-5 above so the only points of integration required are adding the tweet button and the callback implementation.
I integrated the Tweet button as follows:
Once a tweet has been posted, twitter will trigger the
tweet event. The web intent we created will listen for the
tweet event and then trigger the
UPDATE (28th April 2014):