Pure Javascript API for Twitter and Google Plus
Pure Javascript API for Twitter and Google Plus
使用此代码,我可以使用Javascript和我自己的UI按钮/链接等分享到Facebook。
FB.init({
appId : 'MyAppId',
xfbml : true,
version : 'v2.0'
});
//In my .click() method)
FB.ui(
{
method: 'share',
href: document.URL,
},
function(response){
log(response);
if (typeof response != 'undefined') {
alert('Thanks for sharing');
}
}
);
Twitter和Google Plus有相似之处吗?目前我需要使用他们的HTML,因此也需要使用他们的样式。我想能够样式的"共享"选项,我必须匹配我正在工作的网站。
如果它不可能通过Javascript是可能使用PHP吗?我想我可以做一个Ajax调用来共享页面如果PHP可以做到的话
Google+有一个JavaScript API,支持他们现有的所有API功能。然而,Google+不允许在不使用按钮和UI的情况下发帖。例外情况是,如果你想使用应用程序活动或只打算由谷歌应用程序帐户使用。
Twitter在2013年停止了对JavaScript API的支持。要在Twitter上发帖,你必须通过自己的服务器代理请求。
相关文章:
- Windows 8 Metro and Google Analytics
- js window.open and print 在 google chrome 中不起作用
- Xpath with js and google chrome
- Ajax and Google Places API getting json
- Yii2 and Google maps API
- Durandal JS and Google Plus Sign in Javascript API
- javascript google map setcenter and setzoom with animation
- Orbit Slider jQuery and Google Adsense
- Google Maps API V3 and Internet Explorer
- Google Maps JS v3 and HTML5 JavaScript Frameworks
- google.load and google apps script
- AIR and Google Maps Javascript V3 Street View
- WatiN and Google Instant
- ASP.NET MVC 3 and Google Maps API
- JavaScript and Google Analytics
- cakePHP and Google AdSense
- Pure Javascript API for Twitter and Google Plus
- jQuery Mobile and Google Maps
- Angular $http and Google Feed API
- Webpack + React and Google Chrome 43.0.2357.65