android - FB.Event.subscribe does not work when click fb like or unclick -


i fb or unlike event in android . fb.event.subscribe method not fire . strange because javascript code work on https://developers.facebook.com/tools/javascript-console/ not application. know question ask other people . still problem. try many condition , not work. how can solve it.

here webview code..

 <div id="fb-root"></div>   <script>   window.fbasyncinit = function() {  fb.init({   appid      : '578995225546624',   status     : true,   xfbml      : true }); fb.event.subscribe('edge.create',    function(response) {    var likeflag = "1";      alert('you liked url: ' + response);      android.showtoast(likeflag);    }         ); fb.event.subscribe('edge.remove',   function(response) {   var likeflag = "0";      alert('you unliked url: ' + response);        android.showtoast(likeflag);   } );  }; (function(d, s, id) { var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) return; js = d.createelement(s); js.id = id; js.src = "https://connect.facebook.net/en_us/all.js#xfbml=1&appid=578995225546624&version=v2.0"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk'));    </script>  <div class="fb-like" data-href="https://www.facebook.com/testpage" data-layout="standard"   data-action="like" data-show-faces="true" data-share="false"></div> 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -