Using a website API

  • Using a website API

    Some websites provide API access to allow other websties to use their information. A simple example is twitter, that allows users to tweet, or search for tweets. This can be useful if you have a list of clients that you want to inform when you perform an action on your website (such as updating a post) without needing to do the extra steps of logging on to twitter and creating a new post. Maybe you are providing a signaling service to people that would like to know when you are updating your website as soon as possible, and a lot of your users happen to be on twitter. Using twitters api, (and giving them your phone number and unique email address to verify you aren’t some spamming bot), you can create some code that when executed will do something on twitters servers. After you get that working, you attach the code to whatever situation you want to inform people of (such as a database update), and from then on, you will automatically produce tweets without having to actually be on twitter.

    Check back for my working example, I will upload it once I have stripped it of any specific code that probably shouldn’t be shared.


    Leave a comment