Facebook API stream.publish "attachment" doesn't work?

Dear Lazyweb,

When using the Test Console at the bottom of the stream.publish page, I can't seem to ever get it to post an "attachment" or any "action_links", even when using the examples on their own Stream Attachments page -- specifically, everything I put in the "attachment" field seems to be ignored (the entry is just posted without it) and I have yet to find anything I can put in the "action_links" field that does not result in "error JSON decoding action_links".

Can any of you make this work at all? If so, please show me an example. I'm trying:

  • attachment:
    { 'href': 'http://www.dnalounge.com/flyers/2010/10/02.html', 'name': 'test', 'caption': 'test2', 'description': 'test3', 'media': [{ 'type': 'image', 'src': 'http://www.dnalounge.com/flyers/2010/10/02-1.jpg', 'href': 'http://www.dnalounge.com/flyers/2010/10/02.html' }]}
  • action_links:
    [{'name':'Google','href':'http://www.google.com/','description':'Google Home Page'}]

Update: Basically, the documentation is full of lies, including all of the examples: you have to use double-quotes around strings, not single-quotes. Single-quotes work only if you are writing your code in Javascript, but not if you are using the Test Console, Perl, or any other non-Javascript-based API that must communicate through JSON.

Tags: , ,