javascript - Catch 'like it' event on FP Page Plugin -
i have fb-page plugin on sidebar, coded that:
<div class="fb-page" data-href="https://www.facebook.com/xxx" data-width="300" data-height="200" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"> <div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/xxx"><a href="https://www.facebook.com/xxx">xxx</a></blockquote></div></div>
is possible catch event when click on 'like it' button?
https://developers.facebook.com/docs/reference/javascript/fb.event.subscribe/
example:
fb.event.subscribe('edge.create', function(url, html_element) { //like button clicked });
of course have create app , include javascript sdk in page. more information that, in case don´t know already:
- https://developers.facebook.com/docs/javascript
- http://www.devils-heaven.com/facebook-javascript-sdk-login/
make sure use fb.event.subscribe
right after fb.init
.
Comments
Post a Comment