0

我似乎无法将链接嵌入到 FB.ui 的描述部分。我尝试了插入标签的明显方法,但没有奏效。

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){});   

请帮忙!

下面的结果是我想要产生的结果:

在此处输入图像描述

4

1 回答 1

1

我想到了。答案是将 JSON 对象传递给properties参数:

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){}); 
于 2013-10-22T08:35:52.543 回答