我有一个 jquery 测验,它返回一个 10 的值。
我想做的是在用户参加测验后“分享到 facebook”和“tweet 你的分数”按钮。
这是我用于链接的代码:
<a class="facebook" href="http://www.facebook.com/dialog/feed?app_id=xxxxxxxxxxxxxxxxx&redirect_uri=<?=urlencode("https://www.facebook.com/=app_xxxxxxxxxxxxxxxxx");?>&display=page&link=<?=urlencode("https://www.facebook.com/=app_xxxxxxxxxxxxxxxxx");?>&picture=<?=urlencode("");?>&caption=&description=<?=urlencode("I just took the Quiz and scored xx/10. Want to take the quiz? Click here.");?>&name=<?=urlencode("");?>" title="Share on Facebook" target="_blank">Share on Facebook</a>
<a href="http://twitter.com?status=<?=urlencode("I just took the Quiz and scored xx/10. Want to take the quiz? Click here.");?>" title="Tweet" target="_blank" class="twitter">Share on Twitter</a>
所以我希望描述中的 xx/10 显示用户得分,它存储在一个 jQuery 变量中。
非常感谢!