NICE! It works!

Thank you very much!

both tips were very useful:

1. After I changed Accpt–encoding to none, I got some readable text, but not everything.
2. But when I changed the code using a QNetworkAcessmanager, it returned everything, and the code is a lot simpler.

Qt Code:
  1. void MainWindow::doRequest()
  2. {
  3. // INITIALIZATION
  4.  
  5. // Read username, access token
  6. QString id = QString(ui->edUserID->text());
  7. QString access_token = QString(ui->edAcessToken->text());
  8.  
  9.  
  10. manager = new QNetworkAccessManager(this);
  11. connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(resp(QNetworkReply*)));
  12.  
  13. QNetworkRequest request(
  14. "https://graph.facebook.com/"
  15. + id
  16. + "?fields=id,name,about,sports,likes,interests&method=GET&format=json&access_token="
  17. + QUrl::toPercentEncoding( access_token )
  18. );
  19. request.setRawHeader("Accept-Encoding", "none");
  20. request.setRawHeader("User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0");
  21.  
  22. manager->get(request);
  23. }
  24.  
  25. void MainWindow::resp(QNetworkReply *reply)
  26. {
  27. QString responseData = QString::fromAscii(reply->readAll());
  28. ui->edResponse->setText( ui->edResponse->toPlainText() + "\r\n" + responseData);
  29. }
To copy to clipboard, switch view to plain text mode 

I wish you a nice day