publishStory: invalid image key

Jul 1, 2007 at 12:31 AM
I can get publishStory to work with out images,
but when I try to add images i get errors.

for the images

i have

Dim myImages As New System.Collections.Generic.Dictionary(Of String, System.Uri)

myImages.Add("image_1", New Uri(""))

i've debugged it to here:
For Each key As String In images.Keys
If key.Contains("image_") AndAlso (key.Contains("1") OrElse key.Contains("2") OrElse key.Contains("3") OrElse key.Contains("4")) Then
parameterList.Add(key, images(key).ToString())
Throw New FacebookException("invalid image key specified")
End If

so added image_1, but then
get : Feed story photo link invalid


Jul 2, 2007 at 1:30 PM
i will try this today and let you know.

I am adding an issue. So, it doesn't get lost in discussions.
Jul 2, 2007 at 9:14 PM
I am having the same problem, but can not figure out why. I will continue to look into it.

Has anyone gotten this to work???
Jul 3, 2007 at 9:41 PM
In today's build the PublishStory and PublishAction work with images. The caveat is that you must specify both the imageLocation and imageLink. It is not intuitive but currently you can't not leave the image link property empty.
Jul 5, 2007 at 8:35 AM
Edited Jul 5, 2007 at 8:38 AM
Hi, I managed to get this to work.

Dim result As String
Dim title As String
Dim body As String
Dim myImages As New System.Collections.Generic.Dictionary(Of String, System.Uri)

'The title is required, and is limited to 60 displayed characters (excluding tags).
'The a tag is allowed, and there can be zero or ONLY one instance in the title. No other HTML tags are allowed.

title = "This is the title of your news feed."

'The body is optional, and is limited to 200 displayed characters (excluding tags), and can include the HTML tags a, b, and i

body = "This is the body of your news feed."

'Images are optional, can add up to 4 images, must specify the absolute path to the image and specify the hyperlink for when user clicks on the image

myImages.Add("image_1", New System.Uri(""))

myImages.Add("image_1_link", New System.Uri(""))

result = _fbService.PublishStory(title, body, myImages)
Jul 5, 2007 at 1:22 PM

You must not be using the latest build. The interface you are using is the old one.

But, you are right, the main problem was that you need to specify both image and link. i changed the interface to simplify (in my opinion) the passing in of images in the v1.2 build from Friday.
Jul 7, 2007 at 2:28 AM
Yes Thank-you,

Shortly after I had posted I downloaded a new build and realized how simple and clear you made it for users to use PublishStory.

Great work!