ianlee-dev / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

Incorrect signature on photos_upload #232

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When calling 

public T photos_upload( Long userId, String caption, Long albumId, String
fileName, InputStream fileStream )

With a userId specified, an incorrect signature exception is thrown.

What version of the product are you using? On what operating system?
Version 2.1.1

Please provide any additional information below.

I tried calling the method with a null userId. This seems to work.

On investigation it looks like the session ID is not being included in the
signature when you include a userId (the method PHOTOS_UPLOAD_NOSESSION is
called instead of PHOTOS_UPLOAD).

Incidentally the app is a desktop application, generating the secret key
using the recommended method on the Wiki.

Original issue reported on code.google.com by phillip....@gmail.com on 14 Aug 2009 at 8:05

GoogleCodeExporter commented 8 years ago
Just looked at the Facebook API. It says of the uid parameter:

"This parameter applies only to Web applications and is required by them only 
if the
session_key is not specified. Facebook ignores this parameter if it is passed 
by a
desktop application."

Perhaps the uid parameter should be ignored if the app is in desktop mode?

Original comment by phillip....@gmail.com on 14 Aug 2009 at 12:38

GoogleCodeExporter commented 8 years ago
Sounds reasonable. Link to API page where you saw that quote, please.

Original comment by david.j....@googlemail.com on 28 Aug 2009 at 10:17

GoogleCodeExporter commented 8 years ago
It's on the wiki for photos.upload:

http://wiki.developers.facebook.com/index.php/Photos.upload

Original comment by phillip....@gmail.com on 29 Aug 2009 at 6:40