
wordpress漏洞利用
Facebook can play a crucial role in your blog’s growth as it is one of the largest social media network on the web. In this article we will be sharing some of the most valuable tips and tutorials that will let you utilize the power of Facebook and WordPress to your advantage.
由于Facebook是网络上最大的社交媒体网络之一,因此它可以在博客的增长中发挥至关重要的作用。 在本文中,我们将分享一些最有价值的技巧和教程,使您可以利用Facebook和WordPress的优势。
We will organize this tutorial in the method from easiest to hardest, so bare with us.
我们将按照从最简单到最困难的方法来组织本教程,这是我们的第一步。
将Facebook分享链接按钮添加到WordPress (Add a Facebook Share Link Button to WordPress)
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" target="blank"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.png" alt="Share this article on Facebook" /></a>
You will need to place this snippet in your single.php and/or page.php. When your users click on this button, it will automatically open a facebook sharer link which will let them share your article with their friends on facebook. You will need to upload a facebook icon to your theme image directory.
您需要将此代码段放置在single.php和/或page.php中 。 当您的用户单击此按钮时,它将自动打开一个Facebook Sharer链接,使他们可以在Facebook上与朋友共享您的文章。 您需要将一个Facebook图标上传到您的主题图片目录。
将实时Facebook链接共享按钮添加到WordPress (Add a Live Facebook Link Share Button to WordPress)
You probably have seen the popular tweetmeme retweet button on many blogs. This is the similar button except, this is for facebook. It keeps an active count of how many times the page has been shared, so it can be used as a substitute to the hack shared on the top.
您可能已经在许多博客上看到了流行的tweetmeme转推按钮。 这是类似的按钮,除了,这是针对facebook的。 它保持页面共享次数的有效计数,因此它可以代替顶部共享的hack。
You will need to add the following code in your single.php and/or page.php
您将需要在single.php和/或page.php中添加以下代码
<script src="http://widgets.fbshare.me/files/fbshare.js"></script>
The code above will show a large facebook sharer button with the count. But if you want to display a smaller button, then you will need to paste the following code:
上面的代码将显示一个带有计数的大型Facebook共享器按钮。 但是,如果要显示一个较小的按钮,则需要粘贴以下代码:
<script>var fbShare = {
url: 'https://www.wpbeginner.com',
size: 'small',
google_analytics: 'true'
}</script>
<script src="http://widgets.fbshare.me/files/fbshare.js"></script>
This will show a small tweetmeme like button that we have on our post page next to the Related articles at the end of each post.
这将在每个帖子末尾的“相关文章”旁边的帖子页面上显示一个类似tweetmeme的小按钮。
To learn more parameters refer to the original source.
要了解更多参数,请参考原始资料 。
在WordPress中显示Facebook状态 (Display Facebook Status in WordPress)
Just like you would display your recent tweet in WordPress, this plugin will let you display your most recent facebook status on your site. Simply install the plugin and paste the code in your template file.
就像您在WordPress中显示最近的tweet一样,此插件将使您在网站上显示最新的facebook状态。 只需安装插件并将代码粘贴到模板文件中即可。
<?php facebook_status("facebook_status_feed_url"); ?>
在WordPress中创建Facebook仪表板小部件 (Create a Facebook Dashboard Widget in WordPress)
Facebook is essential as you can use it to provide support, and have a huge interaction with your users. But there will be times that you cannot access facebook from some places. Whether it is from work, school, or some other place. Even though this widget does not let you add any text or share anything on facebook, it keeps you updated with what your friends or fans might be sharing by displaying a feed for your friend status updates, or your notification feeds.
Facebook是必不可少的,因为您可以使用它来提供支持,并与用户进行大量互动。 但有时您无法从某些地方访问facebook。 无论是工作,上学还是其他地方。 即使此小部件不允许您在Facebook上添加任何文本或共享任何内容,它仍可以通过显示好友状态更新的供稿或通知供稿来使您的朋友或粉丝共享最新信息。

Simply download the plugin and install it. You can change the height and width and customize it.
只需下载插件并安装即可。 您可以更改高度和宽度并对其进行自定义。
为您的WordPress博客创建一个Facebook粉丝页面 (Create a Facebook Fan Page for your WordPress blog)
Just like you should have a twitter profile for your blog, you should create a facebook fan page for your website. This will be another way where you can share your site links, tutorials, and resources with your audience. Facebook can help you increase your blog’s growth just like twitter can and probably faster depending on your niche. So you must make a profile page.
就像您的博客具有Twitter个人资料一样 ,您也应该为网站创建一个Facebook粉丝页面。 这是与观众共享站点链接,教程和资源的另一种方式。 Facebook可以像Twitter一样帮助您增加博客的增长,并且可能会取决于您的利基而更快。 因此,您必须创建个人资料页面。
Follow the setup and add the necessary settings that you need to. Also don’t forget to subscribe to WPBeginner’s Facebook Page.
按照设置并添加所需的必要设置。 同样不要忘记订阅WPBeginner的Facebook页面 。
在您的网站中嵌入您的Facebook粉丝页面 (Embed Your Facebook Fan Page in Your Site)
Once you have created a page using the method above, you can promote it and get more followers by letting your site users know that it exist. Many top sites including Wired Magazine and others are displaying Facebook fan page on their site to gain more fans (followers).
使用上述方法创建页面后,可以通过让网站用户知道该页面的存在来对其进行推广并吸引更多关注者。 许多顶级网站,包括《连线杂志》和其他网站,都在其网站上显示Facebook粉丝页面,以吸引更多粉丝(关注者)。
Here are the three ways you can display them on your site:
您可以通过以下三种方式在网站上显示它们:

Option 1 takes up a lot of space. It shows your streams, and fans. You will see that in the screen shot above, it shows that you are already a fan, but that is because we took the screenshot from the admin page. But if you are not a fan of WPBeginner page, you can see it on our sidebar it will show Become a Fan button.
选项1占用大量空间。 它显示您的信息流和粉丝。 您会在上面的屏幕快照中看到,它表明您已经是一个粉丝,但这是因为我们从管理页面上截取了屏幕截图。 但是,如果您不是WPBeginner页面的粉丝,则可以在我们的侧栏中看到它,它将显示成为粉丝按钮。
Option 2 just shows a few of your fans and the count with the title. This is the widely used method that is used among many blogs including ours.
选项2仅显示您的一些粉丝以及带有标题的人数。 这是包括我们在内的许多博客广泛使用的方法。
Option 3 is a very simple button and it takes the least amount of space. It does not show the count of fans so it will not be very efficient. Psychologically speaking, when you display social proof, you are more likely to see an increase in new user sign up.
选项3是一个非常简单的按钮,占用的空间最少。 它不显示粉丝数,因此效率不高。 从心理上讲,当您显示社交证明时,您更有可能看到新用户注册的增加。
It is against Facebook Terms of Service (TOS) to modify the JavaScript to only show Become a Fan button and exclude everything else. Even though it is possible to do so with a tweak of a few codes, we strongly recommended that you do not violate the TOS because it can result in your Page Removal.
修改JavaScript以仅显示“成为粉丝”按钮并排除其他所有内容是违反Facebook服务条款(TOS)的行为。 尽管可以通过一些代码的调整来做到这一点,但我们还是强烈建议您不要违反TOS,因为这可能会导致页面删除。
Here is how you can get the code to place on your site:
您可以通过以下方法将代码放置在您的网站上:


Click on Other and copy the code. Paste it in your theme file where you want it to appear. Use the correct styling that you like and now you have a facebook fan box on your WordPress blog.
单击其他并复制代码。 将其粘贴到您希望其出现的主题文件中。 使用您喜欢的正确样式,现在WordPress博客上有一个Facebook粉丝框。
You can modify the height, width and other parameters. For full details check out Facebook Wiki.
您可以修改高度,宽度和其他参数。 有关详细信息,请查看Facebook Wiki 。
If you do not want to go through the Raw Code hassle, then there is a plugin for you called Facebook Fan Box. You can use this plugin to accomplish what we did above.
如果您不想经历Raw Code的麻烦,那么可以使用一个名为Facebook Fan Box的插件。 您可以使用此插件完成我们上面的操作。
为您的WordPress博客创建自己的Facebook应用 (Create Your Own Facebook App for Your WordPress blog)
This application is not super sleek, but what it does is create a simple RSS Feed of your blog with a link to your recent posts. Users can add this application to their facebook profile page to stay updated. There are other application on facebook that lets you do that, but they put a big banner below saying “Provided by”. This app will be completely yours, therefore you would not need copyright or provided by links.
该应用程序不是超级时尚,但是它的作用是为您的博客创建一个简单的RSS Feed,并提供指向您最近帖子的链接。 用户可以将此应用程序添加到其Facebook个人资料页面以保持更新。 Facebook上还有其他应用程序可以使您做到这一点,但是他们在下面标有“提供者”字样。 这个程序将完全是您的,因此您不需要版权或链接提供。
Facebook is now treating websites and blogs as an application, so by using this trick you can give your blogs two lives, one at Facebook and the other at Your Blog. So lets get things started.
Facebook现在将网站和博客视为应用程序,因此通过使用此技巧,您可以给自己的博客两个生命,一个在Facebook上,另一个在Your Blog上。 因此,让我们开始吧。
First thing you will need to do is Download the plugin by John Eckman called WPBook. Install it in your blog, we will deal with the settings in further steps.
您需要做的第一件事是下载John Eckman的名为WPBook的插件。 将其安装在您的博客中,我们将在进一步的步骤中处理设置。
Due to this Plugin and the tutorial, you will accomplish something like this: Facebook App for WPBeginner
由于有了此插件和教程,您将完成以下操作: 适用于WPBeginner的Facebook App
This will ask you permission to whether allow or disallow like any other Facebook Application. By allowing, application developers will have access to your birthdate, gender, location and other demographic information to display targetted ads. But in our case, this app is very light and you will not be monetizing it for the most part.
这将询问您是否允许像其他任何Facebook应用程序一样允许或禁止。 通过允许,应用程序开发人员将可以访问您的生日,性别,位置和其他人口统计信息,以显示目标广告。 但就我们而言,这个应用程序非常轻巧,您绝不会在很大程度上利用它获利。
In this app (example), facebook merely acts as a feed reader where your users can share the links and comment from facebook. All comments are stored in the blog’s server not facebook’s server. But it lets you genereate a community in Facebook and most likely get a new audience and visitors to your site. The reason why you will get more exposure is because all friends of the blog user will now see that they are using your application. Whenever they do something, it will go in the friend’s feed hence more people will likely join.
在此应用程序( 示例 )中,facebook仅充当供稿阅读器,您的用户可以在其中共享来自facebook的链接和评论。 所有评论都存储在博客的服务器中,而不是Facebook的服务器中。 但是,它可以让您在Facebook中建立一个社区,并且很可能在您的网站上吸引新的访问者和访问者。 之所以能获得更多的展示机会,是因为博客用户的所有朋友现在都可以看到他们正在使用您的应用程序。 每当他们做某事时,它将进入朋友的提要,因此可能会有更多的人加入。
步骤1:建立应用程式 (Step 1: Create an Application)
To give your blog a life on Facebook, you will need to setup a new application which will require you to signup as a developer. If you are already a user, you will just have to click the allow button, and you will be signed in as a developer.
要使您的博客在Facebook上生活,您需要设置一个新的应用程序 ,这需要您注册为开发人员。 如果您已经是用户,则只需单击允许按钮,即可以开发人员身份登录。
Once you click on that, you will see a screen like below. Select a name and agree to the terms to move onto the next step.
单击该按钮后,您将看到如下屏幕。 选择一个名称并同意条款以进行下一步。

步骤2 –配置 (Step 2 – Configuration)
Now you will be given an API which you should never share with anyone. In the Basic Configuration step as shown below, you can add your facebook icon, favicon, description and other info.
现在,您将获得一个永远不应该与任何人共享的API。 在如下所示的“基本配置”步骤中,您可以添加您的Facebook图标,图标,描述和其他信息。

The next part is Authentication. When a user use your application, he must click on the “allow” button. Basically in here you will be inserting a post-authorize callback url, which is basically your site URL. When a user allows access to your application, your site will be informed. Same in the next field where is post-remove callback url, your site will be reported when a user removes your app.
下一部分是身份验证。 用户使用您的应用程序时,必须单击“允许”按钮。 基本上,您将在此处插入授权后的回调URL,这基本上是您的网站URL。 当用户允许访问您的应用程序时,将通知您的网站。 与下一个字段(删除后回调网址)相同,当用户删除您的应用时,系统会报告您的网站。
In the field insert your site URL name.
在该字段中,输入您的网站URL名称。

Next step is to pick a Canvas URL. This is the URL which your users will use to access your blog via facebook. For example: http://apps.facebook.com/wpbeginner/. The /wpbeginner part is what you are picking in this step. The plugin we installed WPBook is compatible with iFrame so use iFrame. Use the screenshot below as your guide.
下一步是选择一个画布URL。 这是您的用户用来通过Facebook访问您的博客的URL。 例如: http : //apps.facebook.com/wpbeginner/ 。 / wpbeginner部分是您在此步骤中选择的。 我们安装的WPBook插件与iFrame兼容,因此请使用iFrame。 使用以下屏幕截图作为指导。

Thats it on the Facebook part. Now we will return to our WordPress admin panel and visit the settings of the plugin that we installed called WPBook. If you did not install it till now, this will be the time that you will need to because without it, it won’t work.
在Facebook上就可以了。 现在,我们将返回到WordPress管理面板,并访问我们安装的名为WPBook的插件的设置。 如果您直到现在还没有安装它,那么这将是您需要的时间,因为没有它,它将无法正常工作。
Below is the screenshot of settings that we used for WPBook plugin. There are advanced settings that you can use if you so desire.
以下是我们用于WPBook插件的设置的屏幕截图。 如果需要,可以使用一些高级设置。

预习 (Preview)

You are done with integrating your WordPress into Facebook.
完成将WordPress集成到Facebook的工作。
If you like the above tutorials feel free to share them with your friends on Facebook, twitter or any where else. If you know of some more cool tutorials, then post them in the comment or contact us. We will add to the post and give full credit.
如果您喜欢上述教程,可以随时在Facebook,Twitter或其他任何地方与您的朋友分享。 如果您知道一些更酷的教程,请将其发布在评论中或与我们联系。 我们将添加到帖子中并给予全功。
wordpress漏洞利用