FlickrNet API - add comment to photo fails. Invalid Signature (96)

Topics: Developer Forum, Project Management Forum, User Forum
Mar 8, 2008 at 2:04 PM
I'm getting an Invalid Signature error when trying to add a comment to
a photo using the FlickNet Api...

Here's the code i'm using... any idea what the problem might be :S ?

string apiKey = "efbewq283jkdjk20sd81l8321ki12j3";//fake
string sharedSecret = "berw233as2345";//fake
string authToken = "213opqi2137897";//fake

Flickr flickr = new Flickr(apiKey, sharedSecret, authToken);//successful
Auth auth = flickr.AuthCheckToken(authToken);//successful

Photos photos = flickr.InterestingnessGetList() ;//successful
PhotoCollection pc = new PhotoCollection();//successful

flickr.PhotosCommentsAddComment(pc0.PhotoId,HttpUtility.UrlEncode("comment")); //this call fails - INVALID

Mar 10, 2008 at 12:20 PM
As I said in the email, is it possible this is because you are linking to the FlickrNetCF.dll (i.e. the compact framework version) by mistake?

Also, as stated the UrlEncode is not required as the FlickrNet framework does that for you.
Jul 9, 2009 at 6:20 AM

Hi samjudson

If I have to use the FlickrNetCF.dll to develop app on mobile, what can I do to correct this.

Current status was when I post some odd comment such as "&&%" , the FlickrNetCF will throw a exception of "invalid signature".

It seems something wrong with api_sig, is there ny bug on MD5Hash on .net cf???

Wolud you please help me to solve this issue.



Jul 9, 2009 at 12:38 PM

You are correct, there were a number of bugs in the UrlEncode method in the Utils class, which is an Internal class used to encode the URL.

I've fixed it in the latest source and will try to roll out a new FlickrNetCF.dll in the near future.