我正在做一个facebook应用程序,用stream.publish在墙上分享一些东西。
然而,对于1) attachemnt链接和2) FB UI操作链接,当我单击其中任何一个时,它都会在同一个浏览器窗口中加载页面。
我想以某种方式添加到这些链接,如target="_blank“,以便它打开一个新的标签中的链接。我知道这是可能的,因为当我在youtube上分享视频时,它在动作链接和分享链接上都有一个target="_blank“。
有谁知道诀窍吗?
我试过这样的代码(我插入了目标空格),但它没有在超链接中添加目标元素:
FB.ui(
{
method: 'stream.publish',
message: 'Check out this great app! http://apps.facebook.com/{your_app}',
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',
'target': '_blank',
'src': 'http://test3.com/test.png',
'href': 'http://test3.com'}],
href: 'http://test2.com',
target: '_blank'
},
action_links: [
{ text: 'Code', href: 'http://github.com/facebook/connect-js' }
],
user_message_prompt: 'Share your thoughts about Connect',
target: '_blank'
}
);有人知道youtube是如何实现这些目标的吗?
发布于 2010-09-11 02:57:35
我相信你要找的是
显示:'popup',方法之后:'stream.publish‘
目标是引用fb user_id来张贴到墙上
https://stackoverflow.com/questions/3593633
复制相似问题