Bug 252437

Summary: Facebook album list only shows <Automatisch erstellen>
Product: [Applications] digikam Reporter: aktuelles
Component: Plugin-WebService-FacebookAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, dirk.kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0
Sentry Crash Report:
Attachments: Patch to upgrade authentication to OAuth2

Description aktuelles 2010-09-26 16:25:50 UTC
Version:           1.2.0 (using KDE 4.4.2) 
OS:                Linux

Also my Facebook account has other albums, they will not be shown in the "Export Plugin"...
Also when i create a new album it will not been shown in the DropDown-menu...
Reload also doesn't help :(

Reproducible: Always




OS: Linux (i686) release 2.6.32-24-generic
Compiler: cc
Comment 1 caulier.gilles 2010-09-26 19:31:12 UTC
Can you try with kipi-plugins 1.4.0 ?

Gilles Caulier
Comment 2 aktuelles 2010-09-27 14:41:38 UTC
I tried to install the packages yes...but i can not install them.
While i was compiling them with cmake, i had to add more components to my kubuntu 10.04 and after that my pc has not restarted again.
So i deinstalled everything.

I am not sure if thats a failure in the packages or my failure :)

I there any other way to implement the 1.4.0 packages? e.g over KPackage?
Comment 3 Dirk Tilger 2011-05-27 23:08:48 UTC
Same problem here. I'm using KIPI plugins 1.9.0. I've tracked it down (in my case at least) not to an issue in the KIPI plugins, but an issue with Facebook. Here's the KIPI KDebug output:

-----8<-----
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::listAlbums: Requesting albums for user  0
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=87436684&method=facebook.photos.getAlbums&session_key=yawmayshwedCeebpyljy&sig=915e5f4c60bcc1112f52&uid=64062116793973987947&v=1.0"
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x7ffff43dceef4)
gwenview(12744)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://api.facebook.com/restserver.php")
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x7ffff631c5b5b) KIO::Slave(0x7fffff6d6344b)
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::parseResponseListAlbums: Parse Albums response:
"<?xml version="1.0" encoding="UTF-8"?>
<photos_getAlbums_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"/>
"
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
gwenview(12744)/kio (Slave) KIO::Slave::kill: killing slave pid 12774 ( "https://api.facebook.com" )
-----8<-----

The issue seems related to the deprecated REST and FQL API's:
http://forum.developers.facebook.net/viewtopic.php?id=56175
http://bugs.developers.facebook.net/show_bug.cgi?id=9687
http://bugs.developers.facebook.net/show_bug.cgi?id=11140
http://bugs.developers.facebook.net/show_bug.cgi?id=13136
http://bugs.developers.facebook.net/show_bug.cgi?id=9103

As the REST API we're using here is deprecated, it might work through the opengraph API. Though forum posts seem to indicate the issue exists in opengraph as well. I'll test as soon as I find the time.
Comment 4 Dirk Tilger 2011-05-27 23:09:28 UTC
Same problem here. I'm using KIPI plugins 1.9.0. I've tracked it down (in my case at least) not to an issue in the KIPI plugins, but an issue with Facebook. Here's the KIPI KDebug output:

-----8<-----
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::listAlbums: Requesting albums for user  0
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=87436684&method=facebook.photos.getAlbums&session_key=yawmayshwedCeebpyljy&sig=915e5f4c60bcc1112f52&uid=64062116793973987947&v=1.0"
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x7ffff43dceef4)
gwenview(12744)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://api.facebook.com/restserver.php")
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x7ffff631c5b5b) KIO::Slave(0x7fffff6d6344b)
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::parseResponseListAlbums: Parse Albums response:
"<?xml version="1.0" encoding="UTF-8"?>
<photos_getAlbums_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"/>
"
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
gwenview(12744)/kio (Slave) KIO::Slave::kill: killing slave pid 12774 ( "https://api.facebook.com" )
-----8<-----

The issue seems related to the deprecated REST and FQL API's:
http://forum.developers.facebook.net/viewtopic.php?id=56175
http://bugs.developers.facebook.net/show_bug.cgi?id=9687
http://bugs.developers.facebook.net/show_bug.cgi?id=11140
http://bugs.developers.facebook.net/show_bug.cgi?id=13136
http://bugs.developers.facebook.net/show_bug.cgi?id=9103

As the REST API we're using here is deprecated, it might work through the opengraph API. Though forum posts seem to indicate the issue exists in opengraph as well. I'll test as soon as I find the time.
Comment 5 Dirk Tilger 2011-05-27 23:10:15 UTC
Same problem here. I'm using KIPI plugins 1.9.0. I've tracked it down (in my case at least) not to an issue in the KIPI plugins, but an issue with Facebook. Here's the KIPI KDebug output:

-----8<-----
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::listAlbums: Requesting albums for user  0
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=87436684&method=facebook.photos.getAlbums&session_key=yawmayshwedCeebpyljy&sig=915e5f4c60bcc1112f52&uid=64062116793973987947&v=1.0"
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x7ffff43dceef4)
gwenview(12744)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://api.facebook.com/restserver.php")
gwenview(12744)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x7ffff631c5b5b) KIO::Slave(0x7fffff6d6344b)
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::parseResponseListAlbums: Parse Albums response:
"<?xml version="1.0" encoding="UTF-8"?>
<photos_getAlbums_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"/>
"
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
gwenview(12744)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
gwenview(12744)/kio (Slave) KIO::Slave::kill: killing slave pid 12774 ( "https://api.facebook.com" )
-----8<-----

The issue seems related to the deprecated REST and FQL API's:
http://forum.developers.facebook.net/viewtopic.php?id=56175
http://bugs.developers.facebook.net/show_bug.cgi?id=9687
http://bugs.developers.facebook.net/show_bug.cgi?id=11140
http://bugs.developers.facebook.net/show_bug.cgi?id=13136
http://bugs.developers.facebook.net/show_bug.cgi?id=9103

As the REST API we're using here is deprecated, it might work through the opengraph API. Though forum posts seem to indicate the issue exists in opengraph as well. I'll test as soon as I find the time.
Comment 6 Dirk Tilger 2011-05-27 23:14:41 UTC
Whoops, sorry for posting it 3 times. One more remark: the user ID 0 that is reported is a actually dealt with correctly.
Comment 7 Dirk Tilger 2011-05-28 00:51:10 UTC
Graph API seems to work in my case.
Comment 8 caulier.gilles 2011-06-11 12:11:58 UTC
Reopen for Dirk

Gilles Caulier
Comment 9 caulier.gilles 2011-06-21 16:01:18 UTC
Dirk,

Any news about this file ?

Gilles Caulier
Comment 10 Dirk Tilger 2011-06-21 20:33:02 UTC
(In reply to comment #9)
> Any news about this file ?

Yes, I finished the OAuth2 implementation yesterday and have been testing the code today. To my surprise upgrading to OAuth2 authentication has fixed the problem for me already, so I'll stay away from upgrading to Graph API for now.

I have developed and tested against 1.9.0, because that was the most easy to accomplish without sacrificing system stability and am testing against master now. I'll put up my code to the review board for you to look at. You can catch me in #kde-imaging (Miriup), if you need me.
Comment 11 caulier.gilles 2011-06-22 07:16:03 UTC
Thanks Dirk,

I will take a look in your patch. But no need to use KDEreview tool, KDEBugzilla is enough. Only attach your patch to this entry. There is no link between bugzilla and kdereview. It's a big problem for QA viewpoint. Bugzilla is the reference. KDEReview break the workflow. I already report the problem to KDE team. 

Gilles Caulier
Comment 12 Dirk Tilger 2011-06-22 18:00:09 UTC
Created attachment 61242 [details]
Patch to upgrade authentication to OAuth2

This patch upgrades the authentication method to OAuth2 from some legacy one, but leaves the protocol used as the Facebook "Legacy REST API". This solved the problem for me.
Comment 13 caulier.gilles 2011-06-22 18:09:18 UTC
Please commit and close the file using BUG macro :

http://techbase.kde.org/Policies/SVN_Commit_Policy#Special_keywords_in_SVN_log_messages

When bugzilla file is closed, add file title to NEWS kipi-plugins file for QA :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/NEWS

I will review code after directly from git master.

Gilles Caulier
Comment 14 caulier.gilles 2011-06-22 19:22:53 UTC
Git commit c9afe0e0ed5c83062577b0e2afbfd08d5ff8e9dc by Gilles Caulier.
Committed on 22/06/2011 at 19:21.
Pushed by cgilles into branch 'master'.

compile with Qt < 4.7.0
CCBUGS: 252437

M  +16   -10   facebook/fbtalker.cpp     

http://commits.kde.org/kipi-plugins/c9afe0e0ed5c83062577b0e2afbfd08d5ff8e9dc
Comment 15 caulier.gilles 2011-06-22 19:28:27 UTC
Git commit 129f581e9d145e2a563e68ef9a3b2166fb6a0836 by Gilles Caulier.
Committed on 22/06/2011 at 19:26.
Pushed by cgilles into branch 'master'.

fix coding style
remove orphelan white space
use same bracket rules everywhere.
Dirk : please take a look in HACKING file for details about coding styles
CCBUGS: 252437

M  +27   -23   facebook/facebookjob.cpp     
M  +18   -18   facebook/facebookjob.h     

http://commits.kde.org/kipi-plugins/129f581e9d145e2a563e68ef9a3b2166fb6a0836
Comment 16 Dirk Tilger 2011-06-22 19:32:38 UTC
On 06/22/11 21:28, Gilles Caulier wrote:
> https://bugs.kde.org/show_bug.cgi?id=252437
> --- Comment #15 from Gilles Caulier <caulier gilles gmail com>  2011-06-22 19:28:27 ---
> Git commit 129f581e9d145e2a563e68ef9a3b2166fb6a0836 by Gilles Caulier.
> Committed on 22/06/2011 at 19:26.
> Pushed by cgilles into branch 'master'.
>
> fix coding style
> remove orphelan white space
> use same bracket rules everywhere.
> Dirk : please take a look in HACKING file for details about coding styles
Most of the stuff wasn't from me, but I will read it before changing
anything else. :)
Comment 17 caulier.gilles 2011-06-22 19:33:41 UTC
Git commit e33f16f273dc2f41a5a7a69f4b183a3d7996f5f4 by Gilles Caulier.
Committed on 22/06/2011 at 19:32.
Pushed by cgilles into branch 'master'.

speed up compilation : no need header file if moc file exist
code clean up
CCBUGS: 252437

M  +5    -9    facebook/fbalbum.cpp     
M  +6    -4    facebook/fbalbum.h     
M  +25   -16   facebook/fbitem.h     
M  +0    -1    facebook/fbtalker.cpp     
M  +0    -1    facebook/fbwidget.cpp     
M  +0    -1    facebook/fbwindow.cpp     
M  +3    -0    facebook/mpform.cpp     
M  +2    -0    facebook/mpform.h     

http://commits.kde.org/kipi-plugins/e33f16f273dc2f41a5a7a69f4b183a3d7996f5f4
Comment 18 caulier.gilles 2011-06-22 19:35:18 UTC
Sure, no problem. there is a lots of coding style fix to do. I not reviewed this code since a long time...

Also, please, set you (c) on right files when it's necessary...

Gilles
Comment 19 Dirk Tilger 2011-06-22 20:02:15 UTC
Git commit 189ba8a845a95be514197d12b163ab133d514db4 by Dirk Tilger.
Committed on 22/06/2011 at 19:59.
Pushed by tilger into branch 'master'.

Updated copyright as suggested by Gilles Caulier.

CCBUGS: 252437

M  +1    -0    facebook/fbtalker.cpp     

http://commits.kde.org/kipi-plugins/189ba8a845a95be514197d12b163ab133d514db4
Comment 20 Dirk Tilger 2011-06-22 20:02:15 UTC
Git commit a8861b6acb501992f7d06fb6841a51688f35fc76 by Dirk Tilger.
Committed on 22/06/2011 at 19:54.
Pushed by tilger into branch 'master'.

This just has been implemented.

Nice TODO. I think there's some interesting coding coming up for me. :)

CCBUGS: 252437

M  +0    -1    facebook/TODO     

http://commits.kde.org/kipi-plugins/a8861b6acb501992f7d06fb6841a51688f35fc76
Comment 21 caulier.gilles 2011-06-22 21:45:20 UTC
Git commit bdeb345b6cbf2a3bbfd48eb9b29872c0ead5fed7 by Gilles Caulier.
Committed on 22/06/2011 at 21:44.
Pushed by cgilles into branch 'master'.

polish
fix indent
fix coding style
CCBUGS: 252437

M  +86   -57   facebook/fbtalker.cpp     
M  +30   -21   facebook/fbtalker.h     
M  +28   -43   facebook/fbwidget.cpp     
M  +2    -1    facebook/fbwidget.h     

http://commits.kde.org/kipi-plugins/bdeb345b6cbf2a3bbfd48eb9b29872c0ead5fed7
Comment 22 Dirk Tilger 2011-06-22 23:23:29 UTC
Git commit f58a376ea36feb049de03040c549342e4989560e by Dirk Tilger.
Committed on 22/06/2011 at 23:11.
Pushed by tilger into branch 'master'.

Fixed a bug in authentication key conversion

The Facebook service returns to us the time TO expiry, but we actually
need the time OF expiry.

CCBUGS: 252437

M  +5    -1    facebook/fbtalker.cpp     

http://commits.kde.org/kipi-plugins/f58a376ea36feb049de03040c549342e4989560e
Comment 23 Dirk Tilger 2011-06-25 09:36:06 UTC
Git commit 2ebca6832100c7042947e2bbc69ae3033fdeb216 by Dirk Tilger.
Committed on 25/06/2011 at 11:30.
Pushed by tilger into branch 'master'.

Updated NEWS file for #252437

... and also corrected malformed identing.

BUG: 252437
FIXED-IN: 2.0.0

Tested against gwenview-4.6.80, libkipi-4.6.80,
kipi-plugins-2.0.0_beta6, but using the facebook plugin from the trunk.

M  +2    -2    NEWS     
M  +1    -1    facebook/fbtalker.cpp     

http://commits.kde.org/kipi-plugins/2ebca6832100c7042947e2bbc69ae3033fdeb216
Comment 24 Dirk Tilger 2011-07-26 20:43:55 UTC
Git commit 5f1ecc9b5cca38adb880dc90a2b7bf427dbcb9ca by Dirk Tilger.
Committed on 26/07/2011 at 14:42.
Pushed by tilger into branch 'master'.

Permissions button has not function anymore.

CCBUGS: 252437

M  +0    -1    facebook/fbwidget.h
M  +0    -5    facebook/fbwidget.cpp
M  +0    -2    facebook/fbwindow.h
M  +0    -28   facebook/fbwindow.cpp

http://commits.kde.org/kipi-plugins/5f1ecc9b5cca38adb880dc90a2b7bf427dbcb9ca
Comment 25 Dirk Tilger 2011-07-26 20:43:55 UTC
Git commit b8e2ebdc1a4e6177e347d1e0d3603c080c5e094d by Dirk Tilger.
Committed on 26/07/2011 at 22:23.
Pushed by tilger into branch 'master'.

Fixed bug in the state machine

Without this fix the name of the user as which you're uploading
will not be displayed, when you just logged in.

CCBUGS: 252437

M  +1    -1    facebook/fbtalker.cpp

http://commits.kde.org/kipi-plugins/b8e2ebdc1a4e6177e347d1e0d3603c080c5e094d