Display Facebook likes Count

by Oxygen - 23-03-2015, 06:48 PM
<div class="postbit-usertitle">
Posts:
646
Joined:
Feb 2015
Likes:
50
Credits:
1,214
Reputation:
35
2 Years of Service
#1
OP
Posted: 23-03-2015, 06:48 PM
In Look & Feel-> Manage Skin Sets & Templates-> your skin and then go to globalTemplate.

Replace this:
 
Code:
<if test="$this->settings['showFacebook']=='yes'"><a href="{$this->settings['facebookURL']}" title="Visit us on Facebook" class='facebookButton'>Facebook</a></if>
with this (ID without the brackets):
 
Code:
<if test="$this->settings['showFacebook']=='yes'">
<script>
function showCount(count){
if(count)
document.getElementById('fb_fan_count').innerHTML = + count[0].fan_count;
}
</script>
<a href="{$this->settings['facebookURL']}" title="Visit us on Facebook" class='facebookButton' target='_blank'>Facebook: <span id="fb_fan_count"></span></a>

<script type="text/javascript" src="https://api.facebook.com/method/fql.query?format=json&callback=showCount&query=select+fan_count+from+page+where+page_id%3D[ID_OF_YOUR_PAGE]"></script>

</if>
 
Twitter Doesn't work it isn't supported any more, Twitter changed its API 
 
That's it!
[Image: UeTXrZ5.png]
specialist
20-05-2015, 11:43 AM
Newbie
Posts:
15
Joined:
May 2015
Likes:
0
Credits:
15
Reputation:
0
2 Years of Service
#2
Posted: 20-05-2015, 11:43 AM
tnx for this guide oxygen Smile
Newbie
Posts:
14
Joined:
May 2015
Likes:
0
Credits:
15
Reputation:
0
2 Years of Service
#3
Posted: 02-06-2015, 03:00 AM
thnks~!
good tip ^^
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)