phanan / vue-facebook-signin-button

A simple plugin to include a custom Facebook sign-in button into your web app.
137 stars 30 forks source link

Really dumb question - where does the window.fbAsyncInit goes #8

Open baykingsea opened 6 years ago

baykingsea commented 6 years ago

Does this script goes to the vue's index.js file? is it loaded in index.html window.fbAsyncInit = function() { FB.init({ appId : '{your-app-id}', cookie : true, // enable cookies to allow the server to access the session xfbml : true, // parse social plugins on this page version : 'v2.8' // use graph api version 2.8 }); }; (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/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));

baykingsea commented 6 years ago

anyone?

fernando-ayon commented 6 years ago

@baykingsea You can place it in your root index.html, also don't forget to set the '{your-app-id}' String 👍

miljko1984 commented 5 years ago

@baykingsea You can place it in your root index.html, also don't forget to set the '{your-app-id}' String 👍

Isn't that way visible for public, when inspect elements?

enasfrgamal commented 3 years ago

I tried in my root index.htm and it's okey but now i'm using state & actions and want to save fb token to send it to the server .. any one have a solution?