Question

I can't seem to embed a link into the description part of FB.ui. I tried the obvious of inserting tags but that didn't work.

FB.ui({
    method: 'feed',
    name: 'Los Angeles, CA, United States',
    caption: 'The current condition for Los Angeles is Fair.',
    description: 'Temperature is 58&deg;F.\nLook at details: <a href="www.google.com">here</a>',
    link: 'www.google.com',
}, function(response){});   

Please help!

The result below is what I'm trying to produce:

enter image description here

Was it helpful?

Solution

I figured it out. The answer is to pass a JSON object into the properties parameter:

var p = {
    "Look at details": {
        "text": "here",
        "href": "http://www.google.com"
    }
};

FB.ui({
    method: 'feed',
    name: 'Los Angeles, CA, United States',
    caption: 'The current condition for Los Angeles is Fair.',
    description: 'Temperature is 58&deg;F.\nLook at details: <a href="www.google.com">here</a>',
    link: 'www.google.com',
    properties: p
}, function(response){}); 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top