Connecting to Google, Facebook, Twitter, and co.
Since we discussed QNetworkAccessManager
, you now have the knowledge you need to integrate Facebook, Twitter, or similar sites into your application. They all use the HTTP protocol and simple requests in order to retrieve data from them. For Facebook, you have to use the so-called Graph API. It describes which interfaces are available and what options they offer. If you want to search for users who are called "Helena", you have to request https://graph.facebook.com/search?q=helena&type=user. Of course, you can do this with QNetworkManager
. You will find more information about the possible requests to Facebook at http://developers.facebook.com/docs/graph-api.
If you wish to display tweets in your game, you have to use Twitter's REST or Search API. Assuming that you know the ID of a tweet you would like to display, then you can get it through https://api.twitter.com/1.1/statuses/show.json?id=12345, where 12345
is the actual ID for the tweet...