View Full Version : Qt and Web Services (e.g Facebook)

20th January 2013, 00:19
Hello everyone i was hoping someone here is able to shed some light on a few things for me.
For a while now I have been trying to figure out how i can do the following.

Have a desktop application login to my facebook account and check the home page for recent posts.
Google is not been as helpfull as usual as what i have been able to find out is trivial.
BUT the facebook-cpp-graph-api uses Qt WebKit for auth can someone please point me in the direction of a solution.
I want to be able to display the info as i want so just to download the page or what not is not what am trying to do.

I have not been able to figure this out and i whould realy aprichiate some guidence.
I have lookt at the http://developers.facebook.com/tools/explorer and its seems i can do the recuests in HTML.?

I have never done any programing of this nature (Geting data and posting data to a "Web Service") before so this is all new to me.
And a beginner in Qt so any info at all realy is great.


20th January 2013, 00:52
In general what you will need to use is QNetworkAccessManager.

20th January 2013, 01:19
Ohe this is great thanks for you reply whould you be willing to show me a short example?
Just the bear minimum of how to connect\ login to a web site? (If you got the time for it ofcorse.)


20th January 2013, 01:54
There is a simple example available in the docs. I can't give you an example on how to login to a website because every website is different.

For facebook I think you should start reading here: https://developers.facebook.com/docs/concepts/login/

You will need either QNetworkAccessManager or WebKit.

21st January 2013, 20:11
Whenever one needs a Qt implementation of something, it is usually a good idea to look at the repository of the largest Free and Open Source software community based on Qt: KDE