views:

58

answers:

1

I am new in Facebook API, I found only that page about fb.ui http://developers.facebook.com/docs/reference/javascript/FB.ui . I use new connect-js, and when i just place in my text <img src="/sa/asd/asd.jpg" /> slash is escaping to \/. Please help!

A: 

You need to set media property of attachment object, something like:

 attachment: {
   name: 'Connect',
   caption: 'The Facebook Connect JavaScript SDK',
   description: (
     'A small JavaScript library that allows you to harness ' +
     'the power of Facebook, bringing the user\'s identity, ' +
     'social graph and distribution power to your site.'
   ),
   media: [{ 
    type: 'image', 
    src: 'http://example.com/img.jpg', 
    href: 'http://example.com'
   }],
   href: 'http://github.com/facebook/connect-js'
 },

You can read more about attachments here.

serg
Thanks! Am I only one, who thinks FB docs sux? :)
John
@John Haven't met someone who thinks it doesn't :)
serg

related questions