[Kde-pim] KFacebook Problem

tang yu tangyu619 at gmail.com
Fri Feb 27 14:11:08 GMT 2009


Hi,
    I checkout the KFacebook source code from  "svn co svn://
anonsvn.kde.org/home/kde/trunk/playground/pim/kfacebook".  After make and
make install, I added the kfacebook plasmoid to desktop. But it didn't work
well, what I get is just *a blank white widget* in the desktop.
    The network was working well, and there was no place to configure the
user-name or network stuff.

    I tried to figure out what's going on, I opened the KIO debug info.
below is some situation:

    1. Use plasmaenginexploier to test plasma-engine-facebook:
*plasmaengineexplorer(16704) KFacebook::Session: Found no session or expired
session
plasmaengineexplorer(16704) KFacebook::Session::paramsToKUrl: Using app
secret key
plasmaengineexplorer(16704) KFacebook::Session::paramsToKUrl: FINISHED URL:
KUrl("
http://api.facebook.com/restserver.php?sig=92383319ddbbbad3566fe17833f4d96d&api_key=0d4781a23c2c20fd1717900cb31a8a12&method=facebook.auth.createToken&v=1.0
")*
......
*kio_http(16706) HTTPProtocol::sendQuery: ============ Sending Header:
kio_http(16706) HTTPProtocol::sendQuery: "POST
/restserver.php?sig=92383319ddbbbad3566fe17833f4d96d&api_key=0d4781a23c2c20fd1717900cb31a8a12&method=facebook.auth.createToken&v=1.0
HTTP/1.1"
kio_http(16706) HTTPProtocol::sendQuery: "Connection: Keep-Alive"
kio_http(16706) HTTPProtocol::sendQuery: "User-Agent: KDE Facebook Client
1.0"
kio_http(16706) HTTPProtocol::sendQuery: "Pragma: no-cache"
kio_http(16706) HTTPProtocol::sendQuery: "Cache-control: no-cache"
kio_http(16706) HTTPProtocol::sendQuery: "Accept: text/xml"
kio_http(16706) HTTPProtocol::sendQuery: "Accept-Encoding: x-gzip,
x-deflate, gzip, deflate"
kio_http(16706) HTTPProtocol::sendQuery: "Accept-Charset: utf-8,
utf-8;q=0.5, *;q=0.5"
kio_http(16706) HTTPProtocol::sendQuery: "Accept-Language: en-US, en"
kio_http(16706) HTTPProtocol::sendQuery: "Host: api.facebook.com"
kio_http(16706) HTTPProtocol::sendQuery: "Cookie:
datr=1235558358-5a758e22e82549a825969760bb73365f8fa53d77fdb753109074f"
kio_http(16706)/kio_http_debug HTTPProtocol::httpOpenConnection:
kio_http_cache_cleaner(16707)/kio_http_debug kdemain: kio_http_cache_cleaner
: Current size of cache =  0  kB.
kio_http(16706)/kio_http_debug HTTPProtocol::sendQuery: sent it!
kio_http(16706)/kio_http_debug HTTPProtocol::sendBody: POST'ing live data...
kio_http(16706)/kio_http_debug HTTPProtocol::sendBody: "Content-Length: 0

"
kio_http(16706)/kio_http_debug HTTPProtocol::readResponseHeader:
kio_http(16706) HTTPProtocol::readResponseHeader: ============ Received
Response:
kio_http(16706) HTTPProtocol::readResponseHeader: "HTTP/1.1 500 Missing
Content-Type on POST."
kio_http(16706) HTTPProtocol::readResponseHeader: "Date: Fri, 27 Feb 2009
13:21:07 GMT"
kio_http(16706) HTTPProtocol::readResponseHeader: "Server:
Apache/1.3.41.fb1"
kio_http(16706) HTTPProtocol::readResponseHeader: "P3P: CP="HONK""
kio_http(16706) HTTPProtocol::readResponseHeader: "Set-Cookie:
nectar=1235740867-6fa05aa1e04d90ad62ac6bdb19ba69e39d122e3b07932a48b5f8b;
expires=Sun, 20-Feb-2039 13:21:07 GMT; path=/; domain=.facebook.com;
httponly"
kio_http(16706) HTTPProtocol::readResponseHeader: "Expires: Mon, 26 Jul 1997
05:00:00 GMT"
kio_http(16706) HTTPProtocol::readResponseHeader: "Cache-Control: private,
no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
kio_http(16706) HTTPProtocol::readResponseHeader: "Pragma: no-cache"
kio_http(16706) HTTPProtocol::readResponseHeader: "X-Cnection: close"
kio_http(16706) HTTPProtocol::readResponseHeader: "Transfer-Encoding:
chunked"
kio_http(16706) HTTPProtocol::readResponseHeader: "Content-Type: text/html;
charset=utf-8"
kio_http(16706)/kio_http_debug HTTPProtocol::readResponseHeader:
Content-type:  "text/html"
kio_http(16706)/kio_http_debug HTTPProtocol::readResponseHeader:
Encoding-type:  "charset" = "utf-8"
kio_http(16706) HTTPProtocol::readResponseHeader: --empty--
kio_http(16706)/kio_http_debug HTTPProtocol::readResponseHeader: Emitting
mimetype  "text/html"
kio_http(16706)/kio_http_debug HTTPProtocol::proceedUntilResponseHeader:
Previous Response: 0
kio_http(16706)/kio_http_debug HTTPProtocol::proceedUntilResponseHeader:
Current Response: 500
kio_http(16706)/kio_http_debug HTTPProtocol::readBody: retrieve data. "-1"
left.
kio_http(16706)/kio_http_debug HTTPProtocol::readBody: EOD received! Left =
"0"
kio_http(16706)/kio_http_debug HTTPProtocol::httpClose:
kio_http(16706)/kio_http_debug HTTPProtocol::httpCloseConnection:
plasmaengineexplorer(16704)/kio (KIOJob) KIO::SlaveInterface::dispatch:
error  148   "api.facebook.com"
plasmaengineexplorer(16704) KFacebook::Job::slotFinished: ""
plasmaengineexplorer(16704) KFacebook::Session::gotTokenResponse:
plasmaengineexplorer(16704) KFacebook::Session::gotTokenResponse: error
getting Token:  "Internal error in server
api.facebook.com"*
      2. I add "addMetaData("content-type", "Content-Type:
application/x-www-form-urlencoded")" in "fbjobs.cpp", but get the *Missing
Content http error.
     *3.* *I used firefox to directly access* **
http://api.facebook.com/restserver.php?sig=92383319ddbbbad3566fe17833f4d96d&api_key=0d4781a23c2c20fd1717900cb31a8a12&method=facebook.auth.createToken&v=1.0,
*and received the right response.
*
     *I checked the *http://wiki.developers.facebook.com/index.php/API . *and
there is a note says :* *If you manually form your HTTP POST requests to
Facebook, you must include the request data in the POST body. In addition,
you should include a Content-Type: header of
application/x-www-form-urlencoded.  So, do we need to update the kfacebook?
      Could anyone tell me how to make it work?

Thanks very much.
Br.
**
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list