<script setup>
import { ref, onMounted } from "vue";
const button = ref(null);
const emits = defineEmits(["login"]);
onMounted(() => {
  if (window.FB) {
    window.FB.XFBML.parse();
  }
});
window.onFacebookLogin = () => {
  window.FB.getAccessToken((accessToken) => {
    emits("login", accessToken);
  });
};
</script>

<template>
    <div class="fb-login-button" data-size="large" data-button-type="" data-layout="" data-auto-logout-link="false"
        data-use-continue-as="false" ref="button" data-onlogin="onFacebookLogin()"></div>
</template>
