gpt4 book ai didi

ruby-on-rails - 如何在 rails 3 中使用自定义文本在 facebook 上实现 like 并在 twitter 上分享

转载 作者:行者123 更新时间:2023-12-01 13:01:38 25 4
gpt4 key购买 nike

我想为 facebook 实现 like 并为 twitter 实现带有自定义文本的共享。 (意味着文本已经预定义)。我该怎么做。

我试过这些:--

gem 'facebook_share'
addthis.com // as their promotion they are adding @addthis which is obvious for using there services but i want to have that.

最佳答案

试试这两个。无需包含任何 sdk、插件等。什么都没有。只需将其复制并粘贴到您的 View 文件中即可。

对于 Facebook :--

 <iframe src="http://www.facebook.com/plugins/like.php?href=google.com&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;font=arial&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

对于推特:--

 <a href="http://twitter.com/share" class="twitter-share-button" data-url="google.com" data-text="this is the custom text." data-count="horizontal" data-via="MyTwitterAccountUsername">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

关于ruby-on-rails - 如何在 rails 3 中使用自定义文本在 facebook 上实现 like 并在 twitter 上分享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5547601/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com