How can I get the state ("on" or "off") of the Google +1 button?
The +1 API documentation is here: http://code.google.com/apis/+1button/#jsapi
There is no mention o开发者_如何学Cf how to determine whether the viewing user has already clicked the button or not. This would be a very useful function because it would allow me to encourage people who haven't +1'd a page to do so without putting users who have already +1'd the page through a needless and possibly confusing step.
Has anyone found a way to do this? Thanks
There is callback
attribute, which allows you to add custom callback function, which can react to +1 or -1. See http://www.odditysoftware.com/blog/trap-and-track-google-plus-button-click-events_45.html
But your question is old, maybe it wasn't present yet.
精彩评论