Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 of 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

like image 321
Nathan Labenz Avatar asked Jun 07 '11 17:06

Nathan Labenz


1 Answers

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.

like image 158
Petr Avatar answered Oct 07 '22 12:10

Petr