0

这是我在新窗口中成功显示 Facebook 'Feed' 对话框的工作代码:

      <a class="fbShareToWall" 
        onClick='window.open("https://www.facebook.com/dialog/feed?app_id=103528099783xxx" 
        + "&link=http://www.thesite.com"
        + "&name=Please%20respond%20to%20the%20link"
        + "&caption=Just%20work"
        + "&description=Comeon%20work"
        + "&redirect_uri=http://www.thesite.com");'">Share on Facebook</a>

这成功地在新窗口中显示了 Feed 对话框。

注意上面代码中的 '&name' 参数——在 Feed 对话框中它显示为: Please respond to the link

但是如果你点击它——它什么也不做,就好像它不是一个链接一样。但它实际上是一个链接。

请回复链接”看起来像一个链接——它是粗体字体,字母是蓝色的,而其他参数——在 Feed 对话框中显示为“Just Work”的“标题”参数,以及显示为“Comeon work”的“description”参数——它们既不是粗体也不是蓝色。只是常规文本,这两个参数。

因此,在我的提要对话框打开的情况下,我右键单击请回复链接 并选择“在新窗口中打开链接”,Firefox 会打开一个新浏览器,并且 URL 栏有http://www.thesite.com正如您所注意到的,这就是我在上面的代码中设置 &link 参数的方式。换句话说——Firefox 使用连接到我的 &name 参数的 URL 导航没有问题。

接下来,我检查并确保 Firefox 没有阻止弹出窗口。不是。

我不明白为什么我的“请回复链接”提要对话框 &name参数:

  • 看起来像 Feed 对话框上的可点击链接

  • 右键单击后,可以在新浏览器中打开它——并成功导航到&link参数

  • 如果您单击“请回复Feed”对话框中的链接,则不会执行任何操作。

我在上面的 Feed 对话框代码中是否遗漏了某些内容?

该 Feed 对话框中&name参数的用途是什么?

或者,让&link&name参数看起来是 Feed 对话框上的链接,但点击后不起作用有什么意义?

4

1 回答 1

1

使用 javascript sdk 发布时存在这种保存行为,我认为这是 facebook 的意图。

What you see in that dialog is only a preview of how it will look like when posted, and as a preview it's probably not supposed to act as the real thing. This is probably the behavior so that the user will finish the publishing process with out being redirect to another page (same or different window/tab) by clicking on the items in the preview.

于 2012-04-20T17:38:13.727 回答