google-plus - 如何在 Twitter 等弹出窗口中获得 Google plus 共享?

标签 google-plus google-plus-one

Google+ 图标会自动在 HOVER 上共享页面,并且不需要像其他图标一样点击。有什么办法可以解决这个问题,需要像其他人 [fb,twitter] 一样点击并像 Twitter 共享图标一样加载弹出窗口?

最佳答案

JavaScript window.open方法将打开一个新窗口。您可以将此技术与 share link 结合使用。来完成你的目标。这是从 official docs 中提取的此技术的示例。 .只需将您的目标网址替换为 http://example.com .

<a href="https://plus.google.com/share?url=http://example.com"
  onclick="javascript:window.open('http://example.com','',
  'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
  return false;">
  <img src="https://www.gstatic.com/images/icons/gplus-64.png" 
    alt="Share on Google+"/>
</a>

关于google-plus - 如何在 Twitter 等弹出窗口中获得 Google plus 共享?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10532574/

相关文章:

android - Google Play 服务部分集成

facebook-like - 是否有标签可以在 Google+ 中指定 Google +1 故事格式,例如 Facebook 的 og-meta?

javascript - 在新闻通讯中使用 google plusone 按钮(不是共享按钮)

google-plus - 为什么即使用户在其他地方登录,Google 登录也会返回 “immediate_failed”?

html - Google Share Button 从页面抓取所有图像

google-api - Google API 库用于 +1 或外卖?

url - 在 Google+ 上分享链接

javascript - 与谷歌和他的 API 或登录按钮有困难

iphone - 是否可以直接在 google plus 上发布而无需在网络上添加其他共享对话框

rest - 如何从 Google+ REST API 获取流