Is it possible to use a Facebook Face Pile pointing to an APP-ID instead of a HREF through the JavaScript API? For example, what would the JavaScript equivalent of the iFrame code:
<iframe src=".php?app_id=120600291315567"
style="border:none; overflow:hidden; width:300px; height: 70px">
</iframe>
Is it possible to use a Facebook Face Pile pointing to an APP-ID instead of a HREF through the JavaScript API? For example, what would the JavaScript equivalent of the iFrame code:
<iframe src="http://www.facebook./plugins/facepile.php?app_id=120600291315567"
style="border:none; overflow:hidden; width:300px; height: 70px">
</iframe>
Share
Improve this question
edited Dec 5, 2011 at 18:19
Kevin Sylvestre
asked Dec 4, 2011 at 0:59
Kevin SylvestreKevin Sylvestre
38.1k33 gold badges156 silver badges235 bronze badges
2 Answers
Reset to default 7To show how many friends are using your website/app, just use the HTML5 example generated at https://developers.facebook./docs/reference/plugins/facepile/ and then remove the data-href
attribute. Example:
<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/en_GB/all.js#xfbml=1&appId= 120600291315567";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-facepile" data-width="200" data-max-rows="1"></div>
The data-href
attribute signifies that you want to show how many people have liked that specific URL instead.
<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/en_GB/all.js#xfbml=1&appId= 120600291315567";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-facepile" data-href="http://example." data-width="200" data-max-rows="1"></div>
this actually shown in the social plugin docs in facebook.