怎么运行python程序(怎么运行脚本)
前言
公司需要写一个国外的项目,需要用到facebook登录。
核心内容
项目目录
这里是项目目录主要用到的是:FBlogin这个js。
这个项目只能运行到web中,app和小程序暂时没有做facebook登录
核心代码
main.js
import './utils/FBLogin.js'
logoin.vue
<button class="cu-btn flex lg" style="background-color: rgba; color: #FFFFFF;" @click="onFBLogin"><image class="cu-avatar xs text-center margin-right-xs margin-bottom-xs" src="/static/logoin/facebook.png" style="background-color: rgba;"></image>Logoin with Faccebook</button>
onFBLogin {const _this = this// 检测FB登录状态FB.getLoginStatus { // Called after the JS SDK has been initialized.console.logif { // 已登录// Has logged into your webpage and Facebook._this.handleSomething} else { // 未登录进行登录FB.login {if {console.log// Logged into your webpage and Facebook._this.handleSomething} else {// The person is not logged into your webpage or we are unable to tell.}},{scope: 'public_profile,email'});}})}, //保存的方法 handleSomething {FB.api {uni.setStorageSync});std.toastthis.gohome},
FBLogin.js
{ var js, fjs = d.getElementsByTagName[0]; if ) return; js = d.createElement; js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore; });window.fbAsyncInit = function {FB.init;};
总结
只要愿意花时间,没有什么问题解决不了。其实和vue实现的方法差不多。多看文档就可以了。他的原理也很简单。希望能帮到你。
关于如何规划uniapp的项目目录,我下次会出一个文章。专门说明一下。
海外精品引流脚本--最强海外引流
唯一TG:https://t.me/Facebook181818
