Bug 225174 - Facebook export doesn't create a new album properly but adds to the latest one
Summary: Facebook export doesn't create a new album properly but adds to the latest one
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Facebook (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 18:54 UTC by Mickaël
Modified: 2018-01-30 21:24 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.7.0
Sentry Crash Report:


Attachments
Log of Digikam uploading to Facebook... in the wrond album. (86.97 KB, text/plain)
2010-02-03 16:30 UTC, Mickaël
Details
Kipi facebook log not populating the album dropdown (5.63 KB, text/plain)
2010-09-10 07:55 UTC, SIFTU
Details
digikam & kipi 1.6svn export to fb fails (26.31 KB, text/plain)
2010-11-21 06:44 UTC, Mark
Details
fb.authorize.patch (857 bytes, patch)
2010-11-22 19:37 UTC, Luka Renko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickaël 2010-02-01 18:54:43 UTC
Version:           1.0.0 (using 4.3.2 (KDE 4.3.2), Mandriva Linux release 2010.0 (Official) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.31.6-desktop586-1mnb

I tried to add some photos to Facebook, after asking for "Create automaticaly" the album , but the photos have been added to the latest album I created on Facebook.
The "Create a new Album" button works fine.
Comment 1 Johannes Wienke 2010-02-01 18:58:11 UTC
Which version of kipi plugins do you use? I fixed some problems about this some time ago.
Comment 2 Mickaël 2010-02-01 19:47:44 UTC
[root@CyberTux mickael]# urpmq -S -a kipi
kipi-plugins-debug : Debug information for package kipi-plugins ( 1:1.0.0-2mdv2010.1 )
libkipi6 : kdegraphics4 library ( 2:4.3.2-1.4mdv2010.0 )
kipi-plugins-devel : Development files for kipi-plugins ( 1:1.0.0-0.2mdv2010.0 )
libkipi-common : Common libkipi files ( 1:0.1.6-5mdv2009.1 )
libkipiplugins1 : Library files for kipi-plugins ( 1:1.0.0-0.2mdv2010.0 )
kipi-common : Non-library files for the kipi library ( 2:4.3.2-1.4mdv2010.0 )
kipi-plugins : KDE image Interface Plugins ( 1:1.0.0-0.2mdv2010.0 )
Comment 3 Johannes Wienke 2010-02-01 19:54:36 UTC
Ok, can you please enable full debugging in kdebugdialog for everything that is related to kipi and afterwards start digikam from console, do the actions you described with the export plugin that display the error and paste the console output here?

Ensure that there is no private data in the logs.
Comment 4 Mickaël 2010-02-03 16:30:54 UTC
Created attachment 40502 [details]
Log of Digikam uploading to Facebook... in the wrond album.
Comment 5 Mickaël 2010-02-03 16:37:01 UTC
Hello,

I posted the log file. The image went in the wrong album, the same as the last time (called "Une aprem' au parc Astérix"), but it is not the newer (I created the new one the first February with digikam).
Comment 6 Johannes Wienke 2010-02-03 18:36:11 UTC
SVN commit 1084745 by jwienke:

Changed wrong comparison and default value for strings.

Mickaël, can you have a look if this resolves your issue?

CCBUGS: 225174

 M  +1 -1      fbtalker.cpp  
 M  +1 -1      fbwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1084745
Comment 7 Mickaël 2010-02-04 20:31:45 UTC
I'm sorry, but I cannot build from the SVN, I have the following error :
CMake Error at CMakeLists.txt:13 (KDE4_ADD_PLUGIN):
  Unknown CMake command "KDE4_ADD_PLUGIN".

(I have KDE 4.3.2)
Comment 8 caulier.gilles 2010-02-05 09:58:51 UTC
Install KDELibs-devel package, which contain all cmake script to develop on your computer...

Look README file to check all dependencies.

Gilles Caulier
Comment 9 Dale 2010-08-01 22:06:46 UTC
I'm having this same problem. Having created one album with the export plugin, I am unable to upload to anywhere else except that album. I can't list other albums nor create any new ones. Digikam 1.2.0 Plug-in build date: 2010 Jul 20
Comment 10 Martin Klapetek 2010-08-01 22:16:51 UTC
Similar bug still exists in latest SVN. I am able to create new album, but this album is not added to the list and I can't select it. There is only "auto-create". The reload button won't help either. But the albums get created on facebook. So it seems like the loading album list bug perhaps?
Comment 11 SIFTU 2010-09-10 07:53:27 UTC
I am also experiencing this problem and it looks like a few other people are on the kipi plugins facebook page are too. I have built the latest plugins from SVN

Facebook Import/Export - Kipi-plugins 1.5.0
Build date: Sep 8 2010

I have tried with 2 different facebook accounts and have the same problem. i.e. 

"I am able to create new album, but this
album is not added to the list and I can't select it. There is only
"auto-create"."

Attached is my log of loading the facebook kipi plugin which does not retrieve the album listings.
Comment 12 SIFTU 2010-09-10 07:55:11 UTC
Created attachment 51500 [details]
Kipi facebook log not populating the album dropdown
Comment 13 Mamy Ratsimbazafy 2010-10-06 17:26:11 UTC
Similar problem for me. The first time I used digikam export, I didn't set any album. The photos were uploaded to a default album named something like "kde kipi export picture", I renamed the album. Then in the same digikam session I wanted to create another facebook album, the album was created fine but wasn't available in the dropdown menu, I still tried to upload the photos and they were uploaded to the previously renamed album.
Comment 14 Philipp Schmidt 2010-10-23 13:03:03 UTC
*** This bug has been confirmed by popular vote. ***
Comment 15 caulier.gilles 2010-10-23 18:43:43 UTC
*** Bug 255053 has been marked as a duplicate of this bug. ***
Comment 16 Mark 2010-11-12 17:15:09 UTC
I can confirm problem still persists in kipi 1.5 & 1.6svn . 
Can anyone checked whether patch :
>>>>>>>>>>
Comment #6 From Johannes Wienke 2010-02-03 18:36:11 (-) [reply] ------- 
SVN commit 1084745 by jwienke:

Changed wrong comparison and default value for strings.

Mickaël, can you have a look if this resolves your issue?

CCBUGS: 225174

 M  +1 -1      fbtalker.cpp  
 M  +1 -1      fbwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1084745 
>>>>>>>> 
has been integrated and not dropped again unintentionally? If it's integrated, it doesn't solve the issue as of this date. 

Thanks, Mark
Comment 17 Luka Renko 2010-11-20 23:44:22 UTC
I cannot reproduce the problem on my system (with Ubuntu's 1.4 version). Can somebody post debug logs (or send it to me via mail)?

You need to enable logging with "kdebugdialog" utility and enable debugs for "kipi" and "digikam" levels - just enter it in Search. Then start digikam from command line (Konsole) and collect output.
Comment 18 Mark 2010-11-21 06:44:15 UTC
Created attachment 53600 [details]
digikam & kipi 1.6svn export to fb fails

attached a debug output of digikam and kipi-plugins 1.6 svn (cca a week ago), the problem is still same as for #10 - no albums show up and adding to the same all the time. 

This is a spinlet of the debug log: 

digikam(31991)/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"/>
"
digikam(31991)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
digikam(31991)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
Comment 19 Luka Renko 2010-11-21 08:09:58 UTC
All calls to FB are done correctly, but we get empty album list from FB.
Can you check the album list through new Graph API? Go to http://developers.facebook.com/docs/api and find second link to "Photo Albums", click on link and see if it returns any albums...

BTW, when did you first try FB export plugin? There was some change to permissions In June, maybe it works just for old users (who authorized the plugin before the change).
Comment 20 Mark 2010-11-22 06:13:31 UTC
#19: Hello Luka, 
yes, the link https://graph.facebook.com/me/albums?access_token=XXX returns a correct list of my albums, and yes, I started using FB export like a month ago, so it might be the authorisation issues..?
Comment 21 Martin Klapetek 2010-11-22 14:23:57 UTC
Same here with the latest SVN rev, the link to albums returns correct list of albums and I started using this in July/August.
Comment 22 felix_mauch 2010-11-22 16:25:03 UTC
Exactly the same here. Correct album list, using plugin since August.
Comment 23 Luka Renko 2010-11-22 18:57:01 UTC
OK, it looks like it may be really related to permissions.

More info on changes: 
http://developers.facebook.com/docs/guides/upgrade#permissions
Comment 24 Martin Klapetek 2010-11-22 19:24:12 UTC
Just to add some info - Bloom, the Java uploader, still works ok - http://antaki.ca/bloom/
Comment 25 Martin Klapetek 2010-11-22 19:28:45 UTC
Just to add some info - Bloom, the Java uploader, was successfuly adapted to the new permissions - http://antaki.ca/bloom/
Comment 26 Luka Renko 2010-11-22 19:37:10 UTC
Created attachment 53636 [details]
fb.authorize.patch

Can somebody try this patch (apply to SVN source and build)?
Comment 27 Luka Renko 2010-11-22 22:25:30 UTC
SVN commit 1199836 by lure:

Switch to new Facebook API for requesting application permissions. This
have prevented all new users since July 2010 to upload photos to specific
album or download photos (own or from their friends).
BUG: 225174
BUG: 254110
BUG: 254457


 M  +4 -1      NEWS  
 M  +5 -5      facebook/fbtalker.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1199836
Comment 28 Luka Renko 2010-11-22 22:28:35 UTC
*** Bug 254037 has been marked as a duplicate of this bug. ***
Comment 29 Martin Klapetek 2010-11-23 00:49:32 UTC
Is that patch the same as the SVN commit? If so, then I can't confirm this, it still doesn't show any albums nor the ones I create. Here's the output:


digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=322&ext_perm=photo_upload&method=facebook.users.hasAppPermission&session_key=be90685795a6b444e371ac1e-100000608563855&sig=a569a4dad1f5fda66d93ae96846f5bb6&v=1.0"
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::parseResponseGetUploadPermission: Parse HasAppPermission response:
"<?xml version="1.0" encoding="UTF-8"?>
<users_hasAppPermission_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">0</users_hasAppPermission_response>
"
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::listAlbums: Requesting albums for user  0
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=650&method=facebook.photos.getAlbums&session_key=be90685795a6b444e371ac1e-100000608563855&sig=b90a66a85a73503e55b4b64d45e67a55&uid=100000608563855&v=1.0"
digikam(499)/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"/>
"
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotReloadAlbumsRequest: Reload Albums Request for UID: 0
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::listAlbums: Requesting albums for user  0
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::getCallString: CALL:  "api_key=bf430ad869b88aba5c0c17ea6707022b&call_id=2112&method=facebook.photos.getAlbums&session_key=be90685795a6b444e371ac1e-100000608563855&sig=548bcf29ec0cd5497ba2d18e9a64f3ba&uid=100000608563855&v=1.0"
digikam(499)/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"/>
"
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbTalker::errorToText: errorToText:  0 :  ""
digikam(499)/KIPI (general) KIPIFacebookPlugin::FbWindow::slotListAlbumsDone: Received albums (errCode =  0 , errMsg =  "" ):  ""
Comment 30 Luka Renko 2010-11-23 07:10:35 UTC
I forgot to mention: you have to do Change permission again in order to authorize the applicatio to access your photos.
I have reproduced the problem myself ( by manualy removing authorization on Facebook), but please report back it works for you.
Comment 31 Luka Renko 2010-11-23 07:10:35 UTC
I forgot to mention: you have to do Change permission again in order to authorize the applicatio to access your photos.
I have reproduced the problem myself ( by manualy removing authorization on Facebook), but please report back it works for you.
Comment 32 SIFTU 2010-11-23 07:44:28 UTC
I just got the album list to display. I removed the Kipi plugin application from my facebook account. Compiled the latest plugins from svn. Launched the plugin and authenticated the application. I still didn't have the list displaying until I "Changed Permission" to Direct Upload, then my albums were displayed after it added extra permissions.

Now I see the Kipi facebook application has new privileges including "Access my photos and videos"

So the privs it requires are:
Access my basic information
Access my photos and videos
Access my friends' information
Post to my Wall

Solved for me
Comment 33 Luka Renko 2010-11-23 08:01:28 UTC
Great! Thanks for testing and reporting back!
Comment 34 Mark 2010-11-23 14:21:01 UTC
Thank you Luka and everyone contributing to this! :) 
I really wanted this feature, so I'm happy it's working again. Actually, it was my B-day so I take it as a nice gift from you guys, thanks ;) 
Cheers Marek
Comment 35 James 2010-11-23 22:17:53 UTC
I'm using digikam on fedora 11.  Do I need to reinstall digikam or does it reload plugins each time the program loads?

I've changed permission to Direct upload and it's still not reading the album lists?
Comment 36 Luka Renko 2010-11-23 23:24:29 UTC
No need to reinstall digikam, but check if your kipi-plugins build from svn is installed to correct location. If you execute "Change permission" action, it should request additional authorization, not just direct upload...
Comment 37 James 2010-11-23 23:34:31 UTC
Does digikam build the plugins from SVN or do I?
What is the correct location? If it's the wrong location, how do I change that?

Other than installing it, I've no idea how digikam does all this so please forgive my ignorance.
Comment 38 Martin Klapetek 2010-11-24 01:01:53 UTC
No, you have to build the kipi-plugins yourself. It's actually pretty easy, just follow this guide and you should be fine - http://www.digikam.org/drupal/download?q=download/KDE4
Comment 39 James 2010-11-24 01:23:46 UTC
Many thanks everyone :)!
Comment 40 caulier.gilles 2011-03-13 19:01:24 UTC
*** Bug 268325 has been marked as a duplicate of this bug. ***