Jump to content

Codes for Social Media LIKE in php


Alken Jarge
 Share

Recommended Posts

-----: Just past this code and use it :------ <div id="fb-root"></div><script>(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 = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script><div class="fb-like" data-href="https://www.facebook.com/qualityzoneinfotech" data-width="50px" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div><script language="javascript">function shinra_fb_count( $url_or_id ) { /* url or id (for optional validation) */ if( is_int( $url_or_id ) ) $url = 'http://graph.facebook.com/' . $url_or_id; else $url = 'http://graph.facebook.com/' . $url_or_id; /* get json */ $json = json_decode( file_get_contents( $url ), false ); /* has likes or shares? */ if( isset( $json->likes ) ) return (int) $json->likes; elseif( isset( $json->shares ) ) return (int) $json->shares; return 0; // otherwise zed}</script><div id="social"><!-- AddThis Button BEGIN --><div class="addthis_toolbox addthis_default_style "><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_pinterest_pinit"></a><a class="addthis_counter addthis_pill_style"></a></div><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-51572bbd79133ec6"></script><!-- AddThis Button END --></div>

post-173406-0-86431500-1401014037_thumb.jpg

Link to comment
Share on other sites

Please do not post things like this in the future. You are not teaching anyone anything by putting up a piece of code and telling people to just copy and paste it. This code doesn't even work, you put a PHP function in the middle and told the page it is Javascript. That will cause more than a few syntax errors.

Link to comment
Share on other sites

I also want to become moderator on your website and want to solve perpole Query pls Give me this permission..

Edited by Alken Jarge
Link to comment
Share on other sites

You can still help people and answer their question without being mod

  • Like 1
Link to comment
Share on other sites

I also want to become moderator on your website and want to solve perpole Query pls Give me this permission..

you'll need to put some time in then. As mentioned, you don't need to be a mod to help. All moderators started out as members answering questions, it didn't just happen after being around the forum for a couple days and making a few posts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...