5
Vote

"Incorrect Signature" error when using Stream.Publish()

description

I'm having a very hard time getting Stream.Publish() to work. I keep getting the "incorrect signature" error. This is a Desktop app, not Iframe or FBML. Here's the code I'm using (borrowed from someone else's example of how to make this work):
 
/////////////////////////////////////
            attachment attachment = new attachment();
 
            attachment.caption = "www.icanhascheezburger.com";
            attachment.name = "I am bursting with joy";
            attachment.href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/";
            attachment.description = "a funny looking cat";
            attachment.media = new List<attachment_media>(){new attachment_media_image()
                                {
                                    src = "http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg",
                                    href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/"
                                }};
            string targetID = "100000xxxxxxxxx";  // the FB user who should receive the message 
            FBSession.FacebookAPI.Stream.Publish("This is a test message", attachment, null, targetID, Convert.ToInt64(FBSession.Uid));
//////////////////////////////////////////////////////
 
Stack trace is as follows:
 
Error: Facebook.Utility.FacebookException: Incorrect signature
at Facebook.Utility.Utilities.ParseException(String response, Boolean JSONFormat)
at Facebook.Rest.RestBase.processResponse(WebResponse webResponse)
at Facebook.Rest.RestBase.SendRequestSynchronous(IDictionary2 parameterDictionary, Boolean useSession)
at Facebook.Rest.RestBase.SendRequest[T](IDictionary
2 parameterDictionary, Boolean useSession)
at Facebook.Rest.Stream.Publish(String message, attachment attachment, IList1 action_links, String target_id, Int64 uid, Boolean isAsync, PublishCallback callback, Object state)
at Facebook.Rest.Stream.Publish(String message, attachment attachment, IList
1 actionLinks, String target_id, Int64 uid)
at Highway.frmPopupWindow.btnShare_Click(Object sender, EventArgs e) in J:\Visual Studio 2008\Projects\Highway\Highway\frmPopupWindow.cs:line 332
 
Any help greatly appreciated.

comments

rpowers119 wrote Apr 2, 2010 at 4:02 PM

I just tried the unit tests against the publish methods and they are working. Is this sill an issue?

kilop wrote May 19, 2010 at 2:48 PM

Hi. I'm trying use stream.publish with webforms, and i still get the error "Incorrect signature".
The code is :

facebook.API fbAPI = new API();
            fbAPI.ApplicationKey = "APIKEYXXXXXXX";
            fbAPI.Secret = "SECRETXXXXXXX";
            string appLink = "http://www.google.com";
            string response = fbAPI.stream.publish("Hello World.", null, null, "MY_FB_ID", int.Parse(fbAPI.uid.ToString()));
I have spend a lot of hours trying solve this problem. Can anyone help me?

satyapm10 wrote Dec 9, 2010 at 7:31 AM

facebook.API fbAPI = new API();
fbAPI.ApplicationKey = "APIKEYXXXXXXX";
fbAPI.Secret = "SECRETXXXXXXX";
string appLink = "http://www.google.com";
string response = fbAPI.stream.publish("Hello World.", null, null, "MY_FB_ID", int.Parse(fbAPI.uid.ToString()));

dketan wrote Aug 24, 2011 at 2:59 PM

I am having same problem

dketan wrote Aug 24, 2011 at 3:00 PM

I am having same problem please help me to resolve this issue.

wrote Feb 21, 2013 at 11:37 PM