wordpress简捷按钮
Previously, we showed you how to add the Facebook Like Button in WordPress. The like button allowed your users to like/share your blog posts with their friends on Facebook. Recently, Facebook has announced a new addition to this like button known as the “Send button”. The send button allows your users to share your blog posts with their friends that are on Facebook as well those who are not on Facebook. They can also use the send button to send the message to Facebook Groups that they are part of. Think of this as an email-this button on steroids because it has the social touch to it. Each send counts as a like on Facebook. When someone likes a post, it is shared with all of their friends. But due to hundreds of friends that each person has, the news feed is crowded with so many other things causing your post to be ignored most of the time. The Send button is here to solve that problem because now users can actually suggest your post to a selected friends / groups which will allow you to get GUARANTEED exposure as most people check their Facebook messages. In this article, we will show you how to add the Facebook Send Button in your WordPress blog.
之前,我们向您展示了如何在WordPress中添加Facebook Like Button 。 “喜欢”按钮允许您的用户在Facebook上与他们的朋友喜欢/分享您的博客文章。 最近,Facebook宣布了对这种类似按钮的新添加,即“发送按钮”。 发送按钮可让您的用户与不在Facebook上的朋友共享您的博客文章。 他们还可以使用发送按钮将消息发送到他们所属的Facebook组。 可以将其视为电子邮件,这是类固醇上的此按钮,因为它具有社交意义。 每个发送在Facebook上都算是赞。 当某人喜欢某个帖子时,就会与所有朋友分享。 但是由于每个人都有数百个朋友,因此新闻提要中挤满了许多其他事情,导致您的帖子大部分时候都被忽略。 此处的“发送”按钮可以解决该问题,因为现在用户实际上可以将您的帖子推荐给选定的朋友/群组,这将使您在大多数人查看其Facebook消息时都能获得有保证的曝光。 在本文中,我们将向您展示如何在WordPress博客中添加Facebook发送按钮。
Note: Sometimes, Facebook doesn’t show the right thumbnail image, or the right title by default. To prevent that issue, you should add Facebook Open Graph Meta Data in your WordPress.
注意:有时候,Facebook默认不会显示正确的缩略图或标题。 为了防止该问题,您应该在WordPress中添加Facebook Open Graph Meta Data 。
Now that you know that this is useful, lets add it in your WordPress posts. First open your single.php file in your theme’s folder, then paste the following code inside your loop (In some themes, you will need to locate loop.php file to do this):
现在您知道这很有用,让我们将其添加到WordPress帖子中。 首先在主题文件夹中打开single.php文件,然后将以下代码粘贴到循环中(在某些主题中,您需要找到loop.php文件才能执行此操作):
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:send href="<?php echo get_permalink(); ?>" font=""></fb:send>
But the problem with above code is that it is not the best method. Facebook Send Button can only work well when it is in combination with the like button because without it, it has no social effect. So let us show you how to combine the like button and Send button in one like we have it in this post above.
但是上述代码的问题在于它不是最佳方法。 Facebook“发送按钮”仅在与“赞”按钮结合使用时才能很好地工作,因为没有它,就不会产生社会影响。 因此,让我们向您展示如何将“喜欢”按钮和“发送”按钮结合在一起,就像上面这篇文章中所介绍的那样。
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" show_faces="true" width="450" send="true"></fb:like>
As of now, the send button does not work with the iFrame version of the Like Button, so you would have to use it this way.
到目前为止,“发送”按钮不适用于“喜欢”按钮的iFrame版本,因此您必须以这种方式使用它。
Once you paste the code, you are done. You should see something like what we have at the top of our post. (Click on the button to see its functionality )
粘贴代码后,就完成了。 您应该在帖子顶部看到类似的内容。 (单击按钮以查看其功能)
There are other parameters and options for this plugin.
此插件还有其他参数和选项。
If you want to show the friend icons under the button, then you should use the parameter:
如果要在按钮下方显示朋友图标,则应使用参数:
show_face=true
show_face = true
If you want to display the simple button with only the count and nothing else, then you want to use the parameter:
如果要显示仅包含计数而没有其他内容的简单按钮,则需要使用参数:
layout=box_count
layout = box_count
If you want a darker color scheme for your button, then you need to use the parameter:
如果要为按钮设置较深的配色方案,则需要使用参数:
colorscheme=dark
colorscheme =深色
If you want to change the text from Like to Recommend, then use the parameter:
如果要将文本从“喜欢”更改为“推荐”,请使用参数:
action=recommend
行动=推荐
We think that this send button will be very helpful. Because it is very new, we do not have the data to present it to our users on how much it is helping us, but if you subscribe to our newsletter, then you can be sure to receive updates about this and other cool marketing tricks that will help you grow your blog.
我们认为此发送按钮将非常有帮助。 因为它是非常新的,所以我们没有数据可以向用户展示它对我们有多大帮助。但是,如果您订阅我们的时事通讯 ,那么您可以确保接收到有关此以及其他有趣营销技巧的更新。将帮助您发展博客。
翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-facebook-send-button-in-wordpress/
wordpress简捷按钮