How to talk to a API without opening a webpage?

All I need my app to do, talk to the API, say twitter, get the information that I need, say the latest 20 tweets and display the information in the UI that i have created.

can it be done in c++ or should i use php to accomplish it?

What is the difference in the dependencies if i use php rather than c++?

I am trying to built a cliet that can work with a api, like http://www.twhirl.org

thanks