將社交媒體與公開網站 sharepointIntegrating social media with public-facing websites in SharePoint

摘要:了解如何將社交媒體與公開網站在 SharePoint Server 2016 進行整合。Summary: Learn how to integrate social media with public-facing websites in SharePoint Server 2016.

將您的組織內的社交媒體整合可協助您連絡您的組織目標。整合可增加透明度貴組織的內部網路上完成但您也可以進行的一部分來展開您公開網站達到的社交網路並增加您網站的轉換。Integrating social media within your organization can help you reach your organization's goals. The integration can be done on your organization's intranet to increase transparency, but you can also make social networks a part of your public-facing website to expand reach and increase conversion of your website.

社交媒體整合Social media integration

與社交媒體整合已經成為宣傳中最後一個數年。許多組織希望社交網路與沒有這類整合的表示,及如何它應該支援組織的目標確實了解其公開網站進行整合。本文不需協助您使用組織內的社交網路的遠景的表單。而是提供數種不同的整合案例,並顯示如何您可以獲益。最後,您必須進行關於這些整合技術的哪些可讓您案例的運作與整合的行會教育的選擇。Integration with social media has become hype in the last several years. Many organizations want social networks to be integrated with their public-facing website without a good understanding of what such integration means, and how it should support the organization's goals. This article is not about helping you form a vision for using social networks within your organization. Instead it presents several different integration scenarios, and shows how you can benefit from them. Eventually you must make an educated choice about which of these integration techniques will work for your scenario, and how the integration should look.

通訊觀點您可以使用兩種方式的社交媒體整合:From the communication perspective you can integrate with social media in two ways:

  • 發佈網站可以是一件容易做為新增 Facebook 類似的按鈕中的社交網路的資訊。這可讓您依序展開 [連接到您的網站超過其邊界上的內容並連絡訪客的朋友和同事。Publish information from your website to social networks, which can be as easy as adding a Facebook Like button. This will allow you to expand the reach of the content on your website beyond its boundaries and reach your visitors' friends and colleagues.

  • 運用您的網站上的內容是相關給他的控制其社交網路目前訪客的相關資訊。您可以使用這個方法來協助您探索新的內容不會察覺您網站的訪客。再一次這可協助您依序展開 [您的範圍,並增加您的網站上的轉換。Leverage the information about the current visitor from his social networks to control which content on your website would be the most relevant to her. By using this approach you can help your visitors discover new content on your website that they are not aware of. Once again this can help you expand your reach and increase conversion on your website.

本文說明第一個選項。This article describes the first option.

在 SharePoint 2013 的社交媒體整合的基本知識The basics of social media integration in SharePoint 2013

與社交媒體整合是所有關於盡即將達到相同數目的人員。資訊有關您的網站上的內容、 文章、 部落格文章或產品時探索和找到價值,是否它可以藉由共用其朋友再次可能會與共用其朋友與您訪客。您知道之前,您的內容會連絡否則可能不具備甚至是已知您網站的相關的人員。但是,這會發生,您必須以確定社交網路上共用您的內容時,則它會完全想要尋找的方式。Integrating with social media is all about reaching as many people as possible. Information about the content on your website, whether it is articles, blog posts or products, when discovered and found valuable, it can be shared by your visitors with their friends, who again might share it with their friends. Before you know it, your content will reach people who otherwise might not have even known about your website. But, for this to occur, you have to to make sure that that when your content is shared on social networks, it looks exactly the way that you want it to look.

就如同您可以以最佳化您的網際網路搜尋引擎的 web 內容,您可以將內容傳送至社交網路的相關提供一些中繼資訊。例如 Facebook 或 Yammer 許多社交網路使用開啟圖表通訊協定來擷取內容的相關資訊。若要控制當社交網路上共用內容的顯示方式,您必須將開啟圖表的中繼資料整合至您的網站。使人社交網路上看到您的內容會想要在其上按一下 [中繼資料應說明內容的本質。Just as you can optimize your web content for Internet search engines, you can provide some meta information about your content to social networks. Many social networks such as Facebook or Yammer use the Open Graph protocol to retrieve information about your content. To control how your content is displayed when it is shared on social networks, you have to integrate Open Graph metadata into your website. The metadata should describe the essence of your content so that anyone who sees your content on a social network will want to click on it.

將開啟圖表整合到 SharePoint 2013 使用內建的公用對向網站Integrating Open Graph into a public-facing website built with SharePoint 2013

發佈開啟圖表中繼資料與 SharePoint Server 2016 內建的網站不複雜。但有一些您應該考量的事項。首先開啟圖表定義不同類型的網站內容-類似於您可獲得與 SharePoint 中的內容類型。在開始將開啟圖表整合到您的網站之前,您應該有何種類型的內容已在網站及如何它可以最有效率地使用所述開啟圖表上確實了解。Publishing Open Graph metadata for a website that is built with SharePoint Server 2016 isn't complex. But there are several things that you should consider. First of all Open Graph defines different types of web content - similar to what you can achieve with Content Types in SharePoint. Before you start integrating Open Graph into your website, you should have a good understanding of what types of content that you have on your website, and how it can be described most effectively by using Open Graph.

旁不同的您可以在您的網站發佈的內容類型,也有中發佈內容的方式的差異。SharePoint Server 2016 提供兩種內容發佈模型:Next to the different types of content that you can publish on your website, there are also differences in how that content is published. SharePoint Server 2016 offers two content publishing models:

  • 發佈模型,您可能會在從 SharePoint 2007 和 2010年有已知的傳統內容與階層中的其位置和導覽之網站的頁面的實體位置取決於The classic content publishing model, that you might have known from SharePoint 2007 and 2010 and where the physical location of pages determined their location in the hierarchy and navigation of the website

  • 新搜尋導向發佈模型用來將一或多個來源的內容發佈的 SharePoint Server 2016 搜尋The new search-driven publishing model that uses SharePoint Server 2016 Search to publish content from one or more sources

這些發佈模型有兩種發佈的內容並根據哪一個用在您的網站上,您應該規劃的發佈根據您的內容發佈模型的資訊。These publishing models have two ways of publishing content and, depending on which one that you are using on your website, you should plan for publishing the information according to your content publishing model.

開啟發佈使用 HTML 中繼標記資訊的圖表。這些標記必須位於您網站的標頭區段。若要支援發佈不同開啟圖表資訊的不同類型的頁面和內容發佈模型,您應該在您的主版頁面定義內容預留位置。這可讓您使用適當的中繼資料從不同的版面配置填滿該版面配置區...下列程式碼範例會顯示新增至標準 seattle.master 支援發佈開啟圖表資訊的主版頁面] 內容進行持有者:Open Graph information is published using HTML meta tags. Those tags must be located in the head section of your website. To support publishing different Open Graph information for different types of pages and content publishing models, you should define a Content Place Holder in your Master Page. This will allow you to fill that placeholder with the appropriate metadata from the different Page Layouts.. The following code example shows a Content Place Holder added to the standard seattle.master Master Page to support publishing Open Graph information:

<head>
…
<!--MS:<asp:ContentPlaceHolder
id="OpenGraphPlaceHolder" runat="server">-->
<!--ME:</asp:ContentPlaceHolder>-->
…
</head>

根據開啟圖表通訊協定有四個屬性所需的每個網頁:標題類型圖像URL 。雖然開啟圖表定義數種內容類型,如果您不發佈視訊或音訊的相關資訊,機率是高您將使用本文類型的最 web 頁面。因為不是每一頁的文章,您可能會想要使用的網站類型。如果未指定類型的網站類型會是預設類型。若要簡化使用開啟的圖表我們無法展開上面的程式碼範例新增標題、 URL 及類型的相關資訊。這會防止我們重複相同的程式碼範例會在每個頁面版面配置中。According to the Open Graph protocol there are four properties that are required for every web page: title , type , image , and URL . Although Open Graph defines several content types, if you are not publishing information about video or audio, the odds are high that you'll be using the article type for most your web pages. Because not every page is an article, you might want to use the website type. The website type is the default type if no type is specified. To simplify working with Open Graph we could expand the code example above by adding the information about the title, URL and type. This would prevent us from repeating the same code example within each Page Layout.

雖然開啟圖表的基本資訊已發佈的 SharePoint Server 2016 SEO 資訊的一部分,標準的 SharePoint Server 2016 SEO 控制項無法用以直接在主版頁面與版面配置為開啟圖表 meta 標籤上顯示此資訊。若要使用這些控制項的發佈開啟圖表中繼資料,我們已經建立一組包裝函式控制項和其發佈與本文說明如何建立類似的包裝函式控制項。Although the basic Open Graph information is a part of the SEO information published by SharePoint Server 2016, standard SharePoint Server 2016 SEO controls cannot be used directly to display this information on Master Pages and Page Layouts as Open Graph meta tags. To use those controls for publishing Open Graph metadata, we have built a set of wrapper controls and them published together with this article to explain how you can build similar wrapper controls.

使用 SharePoint Server 2016 搜尋引擎最佳化功能我們可以擷取] 頁面上的相關資訊,如下所示:By using Search Engine Optimization capabilities of SharePoint Server 2016 we can retrieve the information about the page as follows:

<head>
…
<!--SPM:<%@Register Tagprefix="Contoso"
Namespace="Contoso.SharePoint.Seo.Controls"
Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a285ef6967f781d3"%>-->
<!--MS:<Contoso:TemplatedControlWrapper
runat="server">-->
<Control>
   <control
type="Microsoft.SharePoint.Publishing.WebControls.SeoBrowserTitle"
assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</Control>
<ContentTemplate><meta
property="og:title" content="$Value$"/></ContentTemplate>
<!--ME:</Contoso:TemplatedControlWrapper>-->
<!--MS:<Contoso:HyperlinkControlWrapper
runat="server">-->
<Control>
   <control
type="Microsoft.SharePoint.Publishing.WebControls.SeoCanonicalLink"
assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</Control>
<ContentTemplate><meta
property="og:url"
content="$Url$"/></ContentTemplate>
<!--ME:</Contoso:HyperlinkControlWrapper>-->
<meta property="og:type content="article"
/>
<!--MS:<asp:ContentPlaceHolder
id="OpenGraphPlaceHolder" runat="server">-->
<!--ME:</asp:ContentPlaceHolder>-->
…
</head>

這個方法會假設您想要在完全像它會顯示在網頁瀏覽器的標題列中的社交網路上發佈您] 頁面上的標題。您的案例與不同、 可以標題屬性的內容取代為適當的替代方法,或移除,然後它會填入從OpenGraphPlaceHolder內容版面配置區。This approach assumes that you want the title of your page to be published on social networks exactly like it is displayed in the title bar of a web browser. Should your scenario differ, you can replace the contents of the title property with a suitable alternative, or remove it, and then have it filled from the OpenGraphPlaceHolder content placeholder.

使用的標準的 SharePoint Server 2016 搜尋引擎最佳化控制,如上述,更好的優點是對這兩個傳統除了搜尋導向內容發佈模型,且會自動擷取所需要的內容使用所需的方法。The great benefit of using the standard SharePoint Server 2016 Search Engine Optimization controls, as shown above, is that they work for both classic in addition to search-driven content publishing model and will automatically retrieve the necessary content by using the necessary approach.

下一步是提供根據開啟圖表通訊協定類型] 頁面上的特定資訊。使用傳統發佈模型的頁面,您可以使用發佈控制項來擷取內容,例如:The next step is to provide the page-type specific information according to the Open Graph protocol. For pages using the classic publishing model, you can use Publishing controls to retrieve the content, for example:

<!--MS:<asp:ContentPlaceHolder
id="OpenGraphPlaceHolder" runat="server">-->
   <!--SPM:<%@Register
Tagprefix="Contoso"
Namespace="Contoso.SharePoint.Seo.Controls"
Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a285ef6967f781d3"%>-->
   <!--MS:<Contoso:TemplatedControlWrapper
runat="server">-->
   <Control>
     <control
type="Microsoft.SharePoint.WebControls.FieldValue"
assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" FieldName="PublishingContactProfileUrl"
/>
   </Control>
   <ContentTemplate><meta
property="article:author"
content="$Value$"/></ContentTemplate>
   <!--ME:</Contoso:TemplatedControlWrapper>-->
<!--ME:</asp:ContentPlaceHolder>-->

使用搜尋導向的發佈功能時應該改為使用目錄項目重複使用網頁組件:When using search-driven publishing you would use Catalog Item Reuse Web Parts instead:

<!--MS:<asp:ContentPlaceHolder
id="OpenGraphPlaceHolder" runat="server">-->
   <!--SPM:<%@Register
Tagprefix="Contoso "
Namespace="Contoso.SharePoint.Seo.Controls"
Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a285ef6967f781d3"%>-->
   <!--MS:<Contoso:TemplatedControlWrapper
runat="server">-->
   <Control>
     <control
type="Microsoft.Office.Server.Search.WebControls.CatalogItemReuseWebPart"
assembly="Microsoft.Office.Server.Search, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
UseSharedDataProvider="True"
SelectedPropertiesJson="[&amp;quot;PublishingContactProfileUrlOWSTEXT&amp;quot;]"
/>
   </Control>
   <ContentTemplate><meta
property="article:author" content="$Value$"/></ContentTemplate>
   <!--ME:</Contoso:TemplatedControlWrapper>-->
<!--ME:</asp:ContentPlaceHolder>-->

當使用跨網站發佈功能時,在大多數情況下其命名為目錄項目] 頁面上,[詳細資料] 頁面的內容從搜尋索引的呈現,而且可以擷取上面所示。來自受管理的中繼資料服務的資訊取決於名為類別頁面的概觀 (英文) 頁面的內容。應有擷取以顯示您開啟圖表資訊清單的一部分您分類的資訊,您可以使用執行這些動作TermProperty控制項:When using cross-site publishing, in most scenarios the content of the detail pages, which is named catalog item page, is surfaced from the search index and can be retrieved as shown above.The content of overview pages, which are named category pages, is determined by the information coming from the Managed Metadata Service. Should you have to retrieve information from your taxonomy to display it as part of your Open Graph manifest, you can do so by using the TermProperty control:

<!--MS:<asp:ContentPlaceHolder
id="OpenGraphPlaceHolder" runat="server">-->
   <!--SPM:<%@Register
Tagprefix="Contoso"
Namespace="Contoso.SharePoint.Seo.Controls"
Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a285ef6967f781d3"%>-->
   <!--SPM:<%@Register
TagPrefix="Taxonomy"
Namespace="Microsoft.SharePoint.Taxonomy"
Assembly="Microsoft.SharePoint.Taxonomy, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
   <!--MS:<Contoso:TemplatedControlWrapper
runat="server">-->
   <Control>
     <control
type="Microsoft.SharePoint.Taxonomy.TermProperty" assembly=" Microsoft.SharePoint.Taxonomy,
Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
PropertyName="Title" />
   </Control>
   <ContentTemplate><meta
property="article:section"
content="$Value$"/></ContentTemplate>
   <!--ME:</Contoso:TemplatedControlWrapper>-->
<!--ME:</asp:ContentPlaceHolder>-->

不同的社交網路支援不同的中繼資料。根據您想要將您的網站與整合的社交網路,您應該驗證相關的 API。藉由使用上面顯示的技術,您可以在有關您的網頁,並確定您的內容該良好簡報上社交網路提供相關資訊。Different social networks support different metadata. Depending on which social network that you want to integrate with your website, you should verify the relevant API. By using the techniques showed above, you can provide relevant information about your web pages, and to make sure that good presentation of your content on social networks.

具有設定我們網頁的基本資訊,讓我們探索社交網路所提供的不同的整合功能。因簡要考量我們會將焦點上 Facebook,但呈現的機制可能也可套用至其他社交網路。Having configured the basic information about our web pages, let's explore the different integration capabilities offered by social networks. For brevity we'll focus on Facebook, but presented mechanisms could apply to other social networks also.

Facebook 社交增益集和如何協助您將社交 SharePoint 2013 網站中整合的概觀 (英文)Overview of Facebook social plugins and how they can help you integrate social in your SharePoint 2013 website

Facebook 提供可用來與 Facebook 整合在您的網站上的數個標準外掛程式。所有可用的增益集概觀發行次Facebook 社交增益集。以下是一些增益集和如何整合它們與您網站的概觀。Facebook offers several standard plugins that you can use to integrate with Facebook on your website. The overview of all available plugins is published at Facebook Social Plugins. The following is an overview of some plugins and how you can integrate them with your website.

在您開始之前: 觀點Before you start: Insights

當與 Facebook 整合,您可以新增一或多個 widget 至您的網站。雖然這可讓您互動使用 Facebook 外掛程式您網站的訪客,它會提供您極少的意見反應訪客如何使用您有提供這些與社交媒體功能。好消息是如果您想要了解的相關資訊的使用狀況專區社交增益集在您的網站上,您可以獲益 Facebook 提供您的觀點功能。作為 Facebook 應用程式註冊您的網站及之後您網站中包括應用程式識別碼,您將能夠從所有 widget 存取分析的相關資訊的使用狀況 Facebook 上您的網站。When integrating with Facebook, you can add one or more widgets to your website. Although this will allow your visitors to interact with your website using Facebook plugins, it will give you very little feedback about how your visitors use the social media capabilities that you have provided them with. The great news is that if you want to learn more information about the usage of Facebook social plugins on your website, you can benefit from the Insights capability that Facebook offers you. After registering your website as a Facebook application and including the application ID in your website, you'll be able to access analytics information about the usage of Facebook on your website from all the widgets.

詳細資訊,請參閱Facebook 觀點More information, see Facebook Insights.

像] 按鈕Like Button

Facebook 類似按鈕可能是最常用的 Facebook 社交外掛程式。使用單一滑鼠按一下 [訪客可以讓他們知道他們想要在您的網站] 頁面上的朋友。因此您的頁面和甚至是整個網站可能會取得一些其他的廣告。The Facebook Like button is probably the most popular Facebook social plugin. By using a single mouse click your visitors can let their friends know that they like a page on your website. As a result your page and even your whole website might get some additional attention.

雖然您可能會想要包含在網頁上的每一頁上的像] 按鈕,可能無法在詳細資料頁面包含重要的內容在訪客會尋找最有效率。整合您的網站上像按鈕專區很簡單和向下也就是說,您的網站中包含兩個 HTML 片段。Although you might want to include the Like Button on every page on your web page, it might be most effective on detail pages that contain the important content your visitors are looking for. Integrating the Facebook Like Button on your website is easy and comes down to including two HTML snippets in your websites.

首先是應該包含] 頁面上每次直接之後body標記專區 sdk (英文) 通話:First there is the Facebook SDK call that should be included one time per page directly after the body tag:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

如果您已註冊您的網站做為 Facebook 應用程式,您應該包含應用程式識別碼 (底線) 此 snippit 中:If you have registered your website as a Facebook application, you should include your application ID (underlined) in this snippit:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&amp;appId=0123456789";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

因為此 HTML 程式碼片段共用您的網站上的所有頁面之間,包含 SharePoint 網站中的方式是讓它成為您的主圖形] 頁面的一部分,如下圖所示。Because this HTML snippet is shared between all pages on your website, the way to include it in your SharePoint website is to make it a part of your Master Page, as shown in the following figure.

圖 1 程式碼

您必須包含在第二個程式碼範例會類似] 按鈕本身:The second code example that you have to include is the Like Button itself:

<div class="fb-like" data-href="http://www.contoso.com" data-send="true" data-width="450" data-show-faces="true"></div>

因為 Like] 按鈕的位置可能會不同每頁、 整合您網站的最佳方式是納入版面配置。Because the placement of the Like Button might vary per page, the best way to integrate it on your website is to include it in the Page Layout.

根據類似] 按鈕的方針來 Like] 按鈕已包含在其整合] 頁面上的絕對 URL。稍早所述的程式碼範例中的絕對 URL 隨附於資料 href屬性。因為我們想要將程式碼版面配置我們不想要包含的固定的 URL。而是我們想要插入使用版面配置上呈現的目前頁面的 URL。若要取得目前頁面的 URL 的最佳方式考慮 SharePoint Server 2016 提供支援的實體和易記的 Url,是使用 SharePoint Server 2016 Canonical URL 控制項。結合 Like 按鈕 HTML 程式碼範例,它可能看起來如下:According to the Like Button guidelines, the Like Button has to contain the absolute URL of the page on which it is integrated. In the code sample that was mentioned earlier the absolute URL is included in the data-href attribute. Because we want to place the code on the Page Layout we don't want to include a fixed URL. Instead we want to insert the URL of the current page rendered using the Page Layout. Considering that SharePoint Server 2016 offers support for physical and Friendly URLs, the best way to get the URL of the current page is to use the SharePoint Server 2016 Canonical URL control. Combined with the Like Button HTML code example, it would look as follows:

<!--SPM:<%@Register Tagprefix="Contoso" Namespace="Contoso.SharePoint.Seo.Controls" Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a285ef6967f781d3"%>-->
<!--MS:<Contoso:HyperlinkControlWrapper runat="server">-->
<Control>
 <control type="Microsoft.SharePoint.Publishing.WebControls.SeoCanonicalLink" assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</Control>
<ContentTemplate>
 <div class="fb-like" data-href="$Url$" data-send="true" data-width="450" data-show-faces="true"></div>
</ContentTemplate>
<!--ME:</Contoso:HyperlinkControlWrapper>-->

建置讚按鈕外掛程式

當建置 Like 按鈕社交外掛程式有趣的值得考慮的選項包括 [傳送] 選項。When building the Like Button social plugin an interesting option worth considering is including the Send option.

雖然設計使用非常簡單的概念、 整合網站中的類似] 按鈕可協助您依序展開 [連接到您的內容。您要從您的網站上使用 Like] 按鈕取得其他好處在於結合使用的 SharePoint Server 2016 搜尋分析功能,您可以使用之事件的某個人讚您的網站上的網頁。使用此資訊,您可以例如呈現已按讚您在網站上,哪一次增加的轉換機率的重點位置的內容。Although designed by using a very simple idea, integrating the Like Button on your website can help you expand the reach of your content. An additional benefit that you get from using the Like Button on your website is that combined with the SharePoint Server 2016 Search Analytics capabilities, you can use the event of someone liking a web page on your website. By using this information, you can for example present content that was liked on a prominent place on your website, which again increasing your chances for conversion.

傳送按鈕Send Button

當建置 Like 按鈕社交外掛程式有趣的值得考慮的選項包括 [傳送] 選項。時按一下 [Like 選項讓您訪客可與所有人共用您的網頁,其可以使用 [傳送] 按鈕來選擇與他們想要共用您的網頁。這提供這些更多彈性以及另外減少共用您的網站內容的列。When building the Like Button social plugin an interesting option worth considering is including the Send option. While clicking the Like option gives your visitors to share your web page with everyone, they can use the Send button to choose with whom they want to share your web page. This offers them more flexibility and additionally reduces the bar for sharing the contents of your website.

傳送按鈕

支援Comments

發佈原始內容是更好的方式取得常用性和改善搜尋引擎您網站的排名。此外,讓您提供意見反應的訪客可協助您改善您甚至更容易記住和變得更妥善地專門針對對象的興趣的網站。Facebook 提供您可以在網站以允許在訪客可在您的網站上發表評論與整合的註解外掛程式。Publishing original content is a great way for gaining popularity and improving the ranking of your website in search engines. Furthermore, allowing your visitors to give you feedback, can help you improve your website to be even more user-friendly and become better tailored to your audience's interests. Facebook offers the Comments plugin that you can integrate with your website to allow your visitors to comment on your website.

註解方塊

更好都您及您訪客可以是優點的給予您訪客能夠使用 Facebook 可在您的內容上發表評論。雖然它可能會取決於您網站的對象,許多人最近有 Facebook 帳戶。會比較容易讓他們留下註解而不是下列其他註冊程序在網站上使用其現有的 Facebook 設定檔。Giving your visitors the ability to use Facebook to comment on your content, can be of great benefit both to you and your visitors. Although it might depend on the audience of your website, many people have a Facebook account nowadays. It is easier for them to use their existing Facebook profile to leave a comment on your website instead of in following another registration process.

使用 Facebook 的註解的另一個優點是當有人在內容上註解,該註解將會與共用其朋友。理論上這可讓您以擴大您更多的範圍。但是請記住如果註解不是 flattering 每個人都知道它也。Another benefit of using Facebook for comments is that when someone comments on your content, that comment will be shared with their friends. Theoretically this allows you to expand your reach even more. But, remember that if the comment isn't flattering everyone will know it as well.

整合的 Facebook 註解外掛程式的程序類似整合專區 Like] 按鈕。在大多數情況下,您想要移至 [每一頁的內容顯示的 Facebook 註解外掛程式。為達成此目的,您可以將它包含中每個網站內所使用的版面配置的內容。The process for integrating the Facebook Comments plugin resembles integrating the Facebook Like Button. In most scenarios, you want the Facebook Comment plugin to appear underneath the content of every page. To do this, you can include it in the content of each Page Layout used within your website.

同樣地 Facebook 類似] 按鈕以註解增益集包含兩個程式碼範例。第一個是相同的 Facebook 類似] 按鈕。因此,如果您打算將這兩個增益集的整合,您只能有包含其一次。Similarly to the Facebook Like button, the Comments plugins consists of two code examples. The first one is identical to for the Facebook Like button. Therefore, if you plan to integrate both plugins, you only have to include it one time.

第二個程式碼片段是本身的註解外掛程式。應該位於您想要顯示的版面配置:The second snippet is the Comments plugin itself. It should be positioned where you want it to be displayed in your Page Layout:

<div class="fb-comments" data-href="http://www.contoso.com" data-width="470" data-num-posts="10"></div>

同樣地 Facebook 類似] 按鈕以資料 href屬性應該包含您要提供的註解的功能] 頁面上的絕對 URL。這就很可能是目前的頁面,您無法再次方面獲益SeoCanonicalLink控制項來擷取目前頁面的 URL 的:Similarly to the Facebook Like button, the data-href attribute should contain the absolute URL of the page for which you want to provide the commenting capability. As this is very likely to be the current page, you could again benefit of the SeoCanonicalLink control to retrieve the URL of the current page:

<!--SPM:<%@Register Tagprefix="Contoso" Namespace="Contoso.SharePoint.Seo.Controls" Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a285ef6967f781d3"%>-->
<!--MS:<Contoso:HyperlinkControlWrapper runat="server">-->
<Control>
 <control type="Microsoft.SharePoint.Publishing.WebControls.SeoCanonicalLink" assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</Control>
<ContentTemplate>
 <div class="fb-comments" data-href="$Url$" data-width="470" data-num-posts="10"></div>
</ContentTemplate>
<!--ME:</Contoso:HyperlinkControlWrapper>-->

活動摘要Activity Feed

Facebook 提供整合功能,其公開網站上的另一個有趣外掛程式是活動摘要外掛程式。Another interesting plugin that Facebook offers for integrating its capabilities on public-facing websites is the Activity Feed plugin.

活動摘要外掛程式在您的網站上顯示最近的活動。每當某個人喜歡網站內的頁面,活動摘要外掛程式用來顯示類似活動摘要。自訂其他自訂動作也可記錄、 儲存及活動摘要所述。The Activity Feed plugin shows the recent activity on your website. Whenever someone likes a page within your website, the Activity Feed plugin is used to display the Like in the Activity Feed. Other custom actions custom can also be recorded, stored and presented in the Activity Feed.

使用活動外掛程式可以協助您訪客探索新的內容及使用可幫助您依序展開 [連接到您的網站。當訪客已登入專區時、 活動摘要會顯示活動對訪客的朋友。大部分為這些是時間的您訪客知道以及信任的所有人。因此,機率是高他們會依照其建議及探索在您的網站上的新內容。如果它們尚未登入另一方面,活動摘要外掛程式會顯示建議跨網站和當然建議 [登入 Facebook 顯示更多相關的內容。Using the Activity Plugin can help your visitors discover new content and with that help you expand the reach of your website. When your visitors are logged in with Facebook, the Activity Feed will show activities that your visitors' friends have made. As most of the time those are all people who your visitors know and trust. Therefore, the odds are high that they will follow their recommendations and discover new content on your website. If they are not logged in on the other hand, the Activity Feed plugin will show recommendations from across your site and of course suggest logging in to Facebook to show more relevant content.

與其他 Facebook 增益集的活動摘要外掛程式包含整合與網站所需的兩個 HTML 程式碼範例。第一個是我們討論過先前專區 JavaScript sdk (英文) 程式碼片段。第二個活動摘要本身是:As with other Facebook plugins, the Activity Feed plugin consists of two HTML code examples required to integrate it with the website. The first one is the Facebook JavaScript SDK snippet that we have seen previously. The second one is the Activity Feed itself:

<div class="fb-activity" data-site="contoso.com" data-width="300" data-height="300" data-header="true" data-recommendations="false"></div>

活動摘要的設定是直線向。使用資料網站屬性,您必須指定您的網站和應顯示之活動資訊的網域。藉由使用其他資料屬性,您可以控制您的網站上的活動摘要的使用者經驗及您是否要明確包含建議或不。The configuration of the Activity Feed is straight-forward. By using the data-site attribute, you have to specify the domain of your website, and which activity information should be displayed. By using other data attributes, you can control the user experience of the Activity Feed on your website, and whether you want to explicitly include recommendations or not.

雖然您無法利用活動摘要在每一頁上對您的網站,有機會這會搭配使用針對您和影響您的訪客從您的內容。活動摘要可讓您依序展開 [連接到您的網站,因為可能無法以分析您的 web analytics 資料進一步了解並進行活動摘要更為策略性地,例如在常用結束頁面與例如 [首頁] 頁面上的登陸頁面。Although you could place the Activity Feed on every page on your website, there is a chance that this would work against you and distract your visitors from your content. Because the Activity Feed allows you to expand the reach of your website, it might be a better idea to analyze your web analytics data and place the Activity Feed somewhat more strategically, for example on the frequent exit pages and landing pages such as the home page.

因為在大部分情況下,您會將內嵌特定頁面上的活動摘要、 整合與您網站的最佳方式是不包含在主版頁面或頁面配置但將它新增至特定的頁面。若要執行這項作業的最佳方式是內嵌活動摘要程式碼範例會使用指令碼編輯器網頁組件] 頁面中。Because in most scenarios, you will embed the Activity Feed on specific pages, the best way to integrate it with your website is not to include it in the Master Page or Page Layouts, but to add it to the specific pages. The best way to do this is to embed the Activity Feed code example in the page using the Script Editor Web Part.

內嵌程式碼

建議列Recommendations Bar

稍有不同,不過非常有趣、 外掛程式是建議列。此外掛程式也可協助您展開連接到您網站的 [顯示建議的內容。什麼是不同之處建議列是及其使用方式案例。A slightly different, nevertheless very interesting, plugin is the Recommendations Bar. This plugin can also help you expand the reach of your website by displaying recommended content. What's different about the Recommendations Bar is its usage scenario.

[建議] 列是位在瀏覽器視窗的底端。根據其組態而定它可能會看得見後一些時間,例如下班使用者具有捲動過去的特定頁面的中點。因為它提供您訪客可能會感興趣的其他內容的建議與此外掛程式可以是非常有用。The Recommendations Bar is located at the bottom of the browser window. Depending on its configuration it might become visible after some time, for example after users have scrolled past a certain point of the page. This plugin can be very useful because it provides your visitors with suggestions of additional content they might find interesting.

當整合在您的網站上的 [建議] 列,則應考慮整合和詳細資料頁面。如此一來,當您訪客已完成使用目前的內容,它們提供的下一個步驟。再一次此外掛程式需要能夠 Facebook JavaScript sdk 參考 (英文)。本身的外掛程式會以下列標記表示:When integrating the Recommendations Bar on your website, you should consider integrating it with the detail pages. That way, when your visitors have finish using the current content, they are offered a next step. Once again this plugin requires the reference to the Facebook JavaScript SDK to work. The plugin itself is represented by the following markup:

<div class="fb-recommendations-bar" data-href="http://contoso.com/articles/my-article/"></div>

因為您想要在每一頁上顯示的建議,應該將其新增至詳細資料頁面所使用的版面配置。以下是您應該將新增至您為以確定建議列可運作的每一頁的版面配置的標記。請注意如何資料 href屬性的內容所要設定動態使用我們先前所討論的 SeoCanonicalLink 控制項:Because you want recommendations to be visible on every page, you should add it to the Page Layouts used by your detail pages. The following is the markup that you should add to your Page Layouts to to make sure that that the Recommendations Bar will work for every page. Notice how the contents of the data-href attribute are being set dynamically by using the SeoCanonicalLink control we discussed previously:

<!--SPM:<%@Register Tagprefix="Contoso" Namespace="Contoso.SharePoint.Seo.Controls" Assembly="Contoso.SharePoint.Seo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a285ef6967f781d3"%>-->
<!--MS:<Contoso:HyperlinkControlWrapper runat="server">-->
<Control>
 <control type="Microsoft.SharePoint.Publishing.WebControls.SeoCanonicalLink" assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</Control>
<ContentTemplate>
 <div class="fb-recommendations-bar" data-href="$Url$"></div>
</ContentTemplate>
<!--ME:</Contoso:HyperlinkControlWrapper>-->

像其他所有內容,建議列所顯示的建議是由您的網站上的活動控制與 Facebook 所記錄。雖然建議列會顯示個人化內容的建議,但它並不提供您相關內容會顯示其中的任意控制項。雖然建議可能區別如下所建議哪些項目中的差異,他們可以決定是否在訪客會保留在您的網站。Like all other content, the recommendations that are displayed by the Recommendations Bar are controlled by the activity on your website, and recorded by Facebook. Although the Recommendations Bar will display personalized content suggestions, it doesn't offer you any control about what content will be displayed where. Although the differences in which items are suggested as recommendations might be subtle, they could decide whether your visitors will remain on your website.

另一種替代整合是值得考慮 Facebook 建議列與 SharePoint Server 2016 使用提供的內容建議功能。雖然這需要一些自訂與 Facebook 建議列有一個達到類似的使用者經驗,更好的優點是您可以控制哪些內容顯示為建議。因為內容的建議根據 SharePoint Server 2016 搜尋,您可以使用所有功能,其為以確定您訪客會顯示最相關的建議。An alternative to integrating the Facebook Recommendations Bar that is worth considering is using the content recommendations capability that was provided with SharePoint Server 2016. Although it would require some customizations to achieve similar user experience as the one that Facebook Recommendations Bar has, the great advantage is that you can control which content is displayed as recommendations. Because content recommendations are based on SharePoint Server 2016 Search, you can use all its capabilities to to make sure that that the most relevant recommendations are displayed to your visitors.

加值: Yamming 它 !Bonus:Yamming it!

如果您的組織提供產品或服務對用戶、 整合與 Facebook 可能 wise 選擇。如果您的業務更根據知識與在其他企業目標,您可能也整合 Yammer 值得。若要將它放在簡單: Yammer 是 Facebook 企業版。它可幫助組織共用其專業知識供其組織的界限內的通訊。讓更容易使用其 Yammer 網路共用的內容從您的網站訪客可協助您到達多項企業客戶。If your organization offers products or services to consumers, integrating with Facebook might be a wise choice. If your business is more based on knowledge and is targeted at other businesses, it might be worth the effort to integrate with Yammer also. To put it simple: Yammer is Facebook for enterprises. It helps organizations share their knowledge by allowing them to communicate within the boundaries of their organization. Making it easier for your visitors to share the content from your website with their Yammer networks might help you reach more of your business customers.

雖然 Yammer 並不提供相同數目的外掛程式 Facebook 一樣,您可以輕鬆地包含您網站中的一回事是Yam 它] 按鈕。該按鈕 Yam 授與您要共用目前正在造訪與單一滑鼠按一下其 Yammer 網路] 頁面上的訪客。以下是範例程式碼的Yam 它按鈕:Although Yammer doesn't offer as many plugins as Facebook does, one thing that you could easily include in your website is a Yam it button. The Yam it button gives your visitors to share the page that they are currently visiting with their Yammer network with a single mouse click. The following is sample code of a Yam it button:

<a href="javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f= 'https://www.yammer.com/home/bookmarklet',l=d.location,e=encodeURIComponent,p='?bookmarklet_pop=1&amp;amp;v=1&amp;amp;u='+e(l.href)%20+'&amp;amp;t='+e(d.title.replace(/^ *| *$/g,''))%20+'&amp;amp;s='+e(s),u=f+p;a=function()%20{if%20(!window.open(u,'sharer','toolbar=0,status=0,resizeable=1,width=650,height=550'))l.href=f+p};if%20(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0);">Yam it!</a>

Yam 它按鈕完全根據 JavaScript 讓您可以直接在 SharePoint 中包含先前的程式碼片段而不變更它。從整合觀點Yam 它] 按鈕可與 Facebook 類似按鈕最佳比較。因此您認為它是從右至包含 Facebook 類似] 按鈕,儘可能包括的理想位置Yam 它也] 按鈕。The Yam it button is completely based on JavaScript so you can include the previous snippet directly in SharePoint without changing it. From the integration perspective the Yam it button can be best compared with the Facebook Like button. So wherever you feel it is right to include the Facebook Like button, it is probably a good place to include the Yam it button also.

Yam It 按鈕

摘要Summary

整合社交網路與您的網站可以協助您依序展開 [連接到您的網站並協助您訪客探索新的內容。大部分的社交網路提供可以輕鬆地整合在內容管理系統的標準外掛程式。SharePoint 的任何例外狀況。無論文如果您想要整合在某些特定頁面或特定類型的所有頁面上的社交媒體 SharePoint 提供您若要這樣做是輕而易舉地的彈性。Integrating social networks together with your website can help you expand the reach of your website and help your visitors discover new content. Most social networks offer standard plugins that can be easily integrated within your content management system. SharePoint is no exception here. No matter if you want to integrate social media only on some specific pages or all pages of a particular type, SharePoint offers you the flexibility to do this effortlessly.