我已经通过 JS SDK 发布到墙上。它工作正常,但最近它开始出现问题。 问题出在属性上。它不会制作文本超文本,但会显示链接
例子:
properties: [{text: "Best fruit", href: "MY APP LINK"}]
但在发布对话框中,它显示的不是“Best Fruit”而是“MY APP LINK”的链接 它显示“MY APP LINKBest fruit”。
有完整的发布代码:
function showbox()
{
FB.ui(
{
display: 'iframe',
method: 'feed',
name: '<?php echo $mes; ?>',
link: '<?php echo $canvas; ?>',
caption: '<?php echo $mes; ?>',
description: ' ',
properties: <?php echo $_SESSION['properties']; ?>,
redirect_uri: '<?php echo $fbconfig['base'];?>'
});
}
如何使它成为超文本而不是纯文本?
最佳答案
properties
A JSON object of key/value pairs which will appear in the stream attachment beneath the description, with each property on its own line. Keys must be strings, and values can be either strings or JSON objects with the keys text and href.
尝试在 text
和 href
两边加上引号,然后去掉方括号 [
]
看看是否可以更喜欢那个。
属性:{"text": "Best fruit", "href": "MY APP LINK"}
关于javascript - 通过 JS SDK 属性发布 Feed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9182288/