I am new to Arduino and I'm trying to figure out if there is a way to detect bluetooth devices and then, depending on the name of the device, run a query to the Twitter API which Arduino can use to turn on some LEDs. The goal is to build a board that looks for different people's bluetooth devices (e.g. phones, laptops etc..) and then query the Twitter API for tweets based on the user of the device. People would have to already tell me the names of their devices and their Twitter names, but I would like the detection of the devices to happen automatically.
At this point I'm not sure how to do the detection of the devices and turn that into something that Arduino can use to run a query. Any suggestions would be appreciated.