我在我的网站上集成了Google+登录功能,用户可以在本网站上注册,当他们通过Google+互动帖子分享内容时,归因于他们的1分,所以我需要从interactivepost回拨,否则不需要知道用户是否取消共享。你知道如何从交互式邮件中获得回拨吗?代码如下:提前Google plus interactive post callback
4
A
回答
3
<button id="gpShareBtn" class="g-interactivepost"
data-contenturl="<?php echo _PATHWEB; ?>"
data-clientid="<?php echo _GPCLIENTID ?>"
data-cookiepolicy="single_host_origin"
data-prefilltext="text"
data-calltoactionlabel="TRY_IT"
data-calltoactionurl="<?php echo _PATHWEB; ?>"
data-gapiscan="true"
data-onload="true"
data-gapiattached="true">gpshare</button>
由于目前还没有可用的互动信息的回调。有这个,你可以出演显示你的兴趣,并得到更新,开放的功能要求:
https://code.google.com/p/google-plus-platform/issues/detail?id=521
+0
谢谢,谷歌还没有想到这一点很糟糕,几乎每一个行动都应该有一个回调,尤其是在这些情况下 – Easyint
8
实际上,你可以通过添加onshare
键时,会与该插件共享过程的每个步骤的状态
var shareOptions = {
contenturl: "http://example.com",
clientid: "xxx.apps.googleusercontent.com",
cookiepolicy: "single_host_origin",
calltoactionlabel: "GO",
calltoactionurl: "http://example.com/go",
onshare: function(response){
// These are the objects returned by the platform
// When the sharing starts...
// Object {status: "started"}
// When sharing ends...
// Object {action: "shared", post_id: "xxx", status: "completed"}
}
};
gapi.interactivepost.render('some_div_id', shareOptions);
我想你可以做同样的事情与HTML标记为:到JSON(在这种情况下的HTML标签的数据属性),我使用它的JavaScript SDK的render
方法如下制造好。
相关问题
- 1. 在Google Interactive上处理Post事件
- 2. Google Plus Signin'未知的RPC服务:widget-interactive-I0_1370237493291'
- 3. Google Plus创建一个Post-Rest API -Forbidden
- 4. google plus plus cordova phonegap
- 5. Google plus-cmdline-sample
- 6. Google Plus和OpenSocial
- 7. Google plus url sharing
- 8. 黑莓google plus
- 9. Rails with google plus
- 10. Google plus integration
- 11. Google plus sharing
- 12. Android Google plus
- 13. Google ReCAPTCHA onload callback not firing
- 14. 发布到Google+(Google plus)
- 15. 如何为python开发google plus plus oauth2?
- 16. 通过Google Plus API登录
- 17. Google Plus履带式
- 18. Google plus signin“immediate_failed”error
- 19. Google Plus API访问
- 20. Google Plus API C# - AccessViolationException
- 21. Google Plus API Nuget包
- 22. grails google plus插件
- 23. 发布Google Plus流
- 24. 点击Google Plus按钮时,我想调用Google Plus回拨功能
- 25. 摘要说明不显示在Google Plus Post中(Android)
- 26. callback = callback || function(){};
- 27. jQuery等价于YAHOO.util.Connect.asyncRequest('POST',requestUrl,callback,“jsonSlapInfo =”+ value)
- 28. 如何测试Google Plus API(Google Plus测试帐户)?
- 29. “Google凭证无效”Google plus with request/plus/v1/people/me
- 30. 如何使用google-plus-ios-sdk-1.7.1 sdk登录google-plus?
你应该真正使用'htmlspecialchars()'在HTML上下文中使用的任意数据周围。 – Brad