2
我必須爲我的客戶提供獎勵功能。如果有任何客戶分享,請按照網站鏈接,然後我必須存儲他們的詳細信息。問題我們如何才能讓用戶分享某件事。任何幫助,將不勝感激。 我正在使用以下代碼。獲取微博分享回覆
twitter.com/share?text=Your+Email+Marketing&url=http://blog.abc.com/your-email-marketing.html
我必須爲我的客戶提供獎勵功能。如果有任何客戶分享,請按照網站鏈接,然後我必須存儲他們的詳細信息。問題我們如何才能讓用戶分享某件事。任何幫助,將不勝感激。 我正在使用以下代碼。獲取微博分享回覆
twitter.com/share?text=Your+Email+Marketing&url=http://blog.abc.com/your-email-marketing.html
代碼的解決方案: -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://code.jquery.com/jquery-latest.pack.js" type="text/javascript"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="jquery.twitterbutton.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#twitterbutton-example').twitterbutton({
user:'YourUsername',
title:'jQuery-Twitter-Button Plugin with callback functions',
onfollow:function(response){
$('.twitterbutton-uncontent:visible').hide('fade');
$('.twitterbutton-content').show('fade');
$.cookie('tw','followed');
},
ontweet:function(response){
alert("hello");
},
onretweet:function(response){
},
lang:'en'
});
});
</script>
</head>
<body>
<div id="twitterbutton-example"></div>
</body>
</html>
它會提醒上點擊,但可以在Twitter的成功後沒有響應。 – Sudhir 2016-05-19 07:30:25
我檢查你的代碼和ontweet函數總是返回true。 – Scramble 2017-02-17 10:15:06
這是行不通的,因爲twitter改變了它的行爲 – 2017-06-30 10:38:22