This summer, when the explosion in Lebanon happened, tweets were published from around the world regarding that tragic event. The Red Cross and other non-profitable associations asked for donations on Twitter in order to help the people in need. Unfortunately, Twitter does not provide an easy way of making direct payments between accounts, therefore third-party links were published on the platform in order to make donations.
What it does
Twitter Donation (@make_donation) provides a cool & easy way to make donations without leaving the platform.
Simple steps to use Twitter Donation:
- Browse the Twitter Donation website, login with Twitter, and make a deposit.
Making a donation using a tweet is very simple:
@make_donation $5 @recipient
How it's built
Our donation bot is using the Twitter Account Activity API to be notified whenever a user
@mentions it in a tweet. The code of the bot is hosted on Firebase Functions which makes it completely server-less!
The website, which is used only for deposit at first, is hosted on same Firebase account, and uses the PayPal API in order to accept payments.
The initial deposit that you make will go to the PayPal account of Twitter Donation, and the website will keep track of a your balance. When you tweet @make_donation, the bot will verify if your balance is sufficient, if the recipient exists, and make a PayPal transfer from the Twitter Donation account to the recipient account.
Challenges we ran into
The last part I described in the previous section is not ideal, that's because the PayPal API doesn't allow us to transfer funds from one account to another unless the sending account is our.
PayPal is also currently verifying our bank credentials and therefore we cannot make outgoing transfers for now...
What we learned
I learned how to create a Twitter Bot, which creates endless possibilities for new cool projects! Also, as a team, we learned how to integrate multiple tech stacks to create a dynamic and interactive user experience!
What's next for Twitter Donation
The next step for Twitter Donation would be to get rid of the PayPal API (which also takes fees on transfers) and use something more flexible. In the future, we also plan to build upon our current Minimum Viable Product and test the product to Twitter users for feedback and improvements.