0

我有 3 个按钮可以与社交服务分享一些新闻。我想要一些非常简单的东西,基本上可以在 html 中工作(......东西是动态的):

<a target="_blank" href="?">
    <div class="fb-button button"></div>
</a>
<a target="_blank" href="https://twitter.com/intent/tweet?url=...">
    <div class="tw-button button"></div>
</a>
<a target="_blank" href="http://pinterest.com/pin/create/button/?url=...&media=...">
    <div class="pi-button button"></div>
</a>

facebook中有一些东西可以用作href,一个帖子界面的url或其他东西?我想答案可能是“不”,那么正确的解决方案是什么?我不想要一个标准的like按钮,我不想用css自定义like按钮,我不想用javascript开发一个post call,因为我真的希望用户收到一个窗口(或弹出窗口或其他东西)他可以在接受之前自定义帖子的内容。

先感谢您。

4

1 回答 1

1

当我单击 Wordpress 中的共享按钮以通过 Facebook 共享我的博客时,它打开了一个带有以下 URL 的窗口:

http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwp.me%2Fpz9a5-dO&t=Training+Bulletin+180

所以,我猜你可以简单地使用sharer.php并将你的网站设置为你创建的href中“u”的值。所以第一行代码可能是:

一个目标="_blank" href="http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fmylink.com%2Fpage.htm"

于 2012-05-30T15:00:46.933 回答