JavaScript Facebook分享一个网页

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript Facebook分享一个网页相关的知识,希望对你有一定的参考价值。

<div style='float:right; margin-left:10px;'>
<script>var fbShare = {
url: 'http://chethstudios.blgospot.com/',
size: 'small',
google_analytics: 'true'
}</script>
<script src="http://widgets.fbshare.me/files/fbshare.js"></script>
</div>

/*
1.<div style='float:right; aligns the button to the right. set it as left if you want it on the left hand side of the post.
2.the above code was pasted above the <data:post.body/> tag. So if you want the retweet button in the bottom section of your post. Place the code below <data:post.body/>

3.size - The size of the button: 'large' OR 'small' (if not specified, defaults to 'large')
4.url - The URL of the page you want shared on Facebook (if not specified, defaults to that of the page on which the button is displayed)
5.title - The name of the page you want shared on Facebook (if not specified, defaults to that of the page on which the button is displayed)
6.google_analytics - If no awesm_api_key specified, sets whether fbshare.me links have Google Analytics parameters added: true OR false (if not specified, defaults to false)
7.awesm_api_key - For existing awe.sm customers only (if not specified, will use fbshare.me links)

*/

以上是关于JavaScript Facebook分享一个网页的主要内容,如果未能解决你的问题,请参考以下文章

如何为我的网页创建动态 Facebook 分享链接

Instagram:从网页分享照片

web网页动态分享facebook和twitter

利用 JavaScript SDK 部署网页版“Facebook 登录”

Javascript - WinRT - 如何与 twitter 或 Facebook 分享分数?

Facebook javascript SDK 分享图片问题