2014-05-10 32 views
0

我看不到任何解決方案,允許這個特定的請求沒有很多腳本或元標籤,所以我希望有一個簡單的方法來做這個。如何爲Facebook,Twitter,Google+和Pinterest創建自定義分享鏈接

我正在尋找所有四個社交網絡的自定義共享鏈接。讓我舉一個具體的例子。

如果有人點擊我的網站Twitter圖標鏈接,他們點擊以下:

<a href="https://twitter.com/home?status="Welcome to my site and tell all your friends! @sitename #mysiterules http://bit.ly/site"> 
    <img src="twitter.png"> 
</a> 

它會去Twitter的網站,併產生如下: enter image description here

這使得有人以非常快速的方式宣傳我的網站,並提供一個自定義的消息,如果他們喜歡,他們可以改變,但在點擊圖標鏈接之外沒有任何努力。

這正是我想要對其他三個社交網絡做的,它具有自定義消息和鏈接。他們也可以拉我的網站的默認徽標,這是Twitter不能做的。

我該如何做到這一點?

回答

2

在Facebook上,你不能共享的預填充消息根據平臺策略2.3:「確保在用戶消息參數的所有內容都是由用戶輸入不預填這包括帖子,郵件,評論和標題。「

如果你希望人們在Facebook上分享我會建議使用Share(分享)按鈕:https://developers.facebook.com/docs/plugins/share-button/

+1

Awww,那太糟糕了。 :(我很欣賞這個問題。 – micah

7

我建議你使用正確的社交分享按鈕就像我們實施了我們live campaign page,但這裏是一些代碼,我從偷廣告系列頁面的樣機。

<div class="leader-half kids0514-share">Share this on: 
    <a href="mailto:?subject=Your%20Family,%20Your%20Vacation&body=Enter%20to%20win%20a%20dream%20family%20vacation.%20http://www.cwtvacations.ca/yourfamilyyourvacation"><img src="images/en/share_mail.jpg" alt="email"></a> 
    <a href="https://facebook.com/sharer.php?u=http://www.cwtvacations.ca/yourfamilyyourvacation" target="_blank"><img src="images/en/share_fb.jpg" alt="facebook"></a> 
    <a href="https://twitter.com/intent/tweet?url=http://www.cwtvacations.ca/yourfamilyyourvacation&text=Your%20family,%20your%20vacation.%20Enter%20to%20win%20a%20dream%20family%20vacation.&via=CWTVacationsCA" target="_blank"><img src="images/en/share_tweet.jpg" alt="twitter"></a> 
    <a href="http://pinterest.com/pin/create/button/?url=http://www.cwtvacations.ca/yourfamilyyourvacation&description=Your%20family,%20your%20vacation.%20Enter%20to%20win%20a%20dream%20family%20vacation.&media=https://www.cwtvacations.ca/cwt/images/en/kids2014_share.jpg" target="_blank"><img src="images/en/share_pin.png" alt="pinterest"></a> 
    <a href="https://plus.google.com/share?url=http://www.cwtvacations.ca/yourfamilyyourvacation" target="_blank"><img src="images/en/share_plusone.jpg" alt="google plus"></a> 
</div> 

並非所有的社交分享按鈕都是相同的,有些功能更多,甚至可以使用舊版本。 Pinterest非常小。 I recommend using the official buttons and full structured meta data,而不是按照模型中這個片段的方式進行。

相關問題