Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
38
rated 0 times [  42] [ 4]  / answers: 1 / hits: 21966  / 14 Years ago, sat, may 22, 2010, 12:00:00

I want to add the facebook 'Like' button to my website, but the JavaScript API is asking for 'your app id'



<div id=fb-root></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>


What should I put there?



I could use the iframe code they give, but would prefer to use the XFBML as it will allow me to add more features in the future.



Thanks.


More From » api

 Answers
37

You should create your app in the facebook developer section and there you will be assigned app id (application id), that is what you should put in there.


[#96710] Wednesday, May 19, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
xiomara

Total Points: 378
Total Questions: 90
Total Answers: 104

Location: Guernsey
Member since Thu, Oct 7, 2021
3 Years ago
;