CIFCOM跨境电商 CIFCOM跨境电商

当前位置: 首页 » 出海百科 »

如何用谷歌账号登录line

Facebook、Twitter登录及分享

创建应用接入

使用Hello.js接入

使用Hello.js简化接入,facebook和twitter接入方法一样。

Hello.js()是一个客户端JavaScript SDK,用于OAuth2认证Web服务以及请求它们的REST Api。

HelloJS标准化了路径,并响应常见的API,比如说Google Data Services、Facebook Graph以及Windows Live Connect。它们是模块,所以这个列表还在增长中。

// 初始化,配置应用idhello.init({ facebook: FACEBOOK_CLIENT_ID, windows: WINDOWS_CLIENT_ID}, {redirect_uri:'redirect.html'})// 登录hello.on('auth.login', function(auth){ // 登录成功后,获取用户信息(fb、tw的用户数据有区别) hello( auth.network ).api( '/me' ).then(function (res) { console.log(res) })})

Facebook登录后获取的用户信息

{ email: "XX@gmail.com", first_name: "XX", id: "123456", last_name: "XX", name: "XX", picture: "url", thumbnail: "url"}

Twitter登录后获取的用户信息

{ "id": 123456, "id_str": "123456", "name": "XX", "screen_name": "XX", "location": "", "description": "xx", "url": "url", "entities": { "description": { "urls": [] } }, "protected": false, "followers_count": 0, "friends_count": 0, "listed_count": 0, "created_at": "Fri Mar 08 03:36:20 +0000 2024", "favourites_count": 0, "utc_offset": null, "time_zone": null, "geo_enabled": false, "verified": false, "statuses_count": 0, "lang": "en", "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "F5F8FA", "profile_background_image_url": null, "profile_background_image_url_https": null, "profile_background_tile": false, "profile_image_url": "url", "profile_image_url_https": "url", "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": true, "default_profile_image": true, "following": false, "follow_request_sent": false, "notifications": false, "translator_type": "none", "suspended": false, "needs_phone_verification": false, "first_name": "XX", "last_name": "", "thumbnail": "url"}Facebook分享

触发分享:

<a href="_javascript:void(0)" @click="fbShare">facebook 分享</a>fbShare () { let sharePath = '' // 分享出去之后别人打开的链接 let title = '' // 分享标题 window.open('?u=' + encodeURIComponent(sharePath) + '&t=' + encodeURIComponent(title), '_blank', 'toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=600, height=450, top=100, left=350')}

分享信息设置:

分享出去的样式包含图片,标题,简介

这些信息不是分享的时候设置的,是爬虫直接爬的分享链接页面head中预先设置好的分享信息,head配置如下

<meta property="og:locale" content="en-US"><meta property="og:type" content="website"><meta property="og:title" content="realme Holi Game"><meta property="og:image" content="xx.jpg"><meta property="og:description" content="hello world">Twitter分享

触发分享:

<a href="_javascript:void(0)" @click="twShare">Twitter 分享</a>twShare () { let content = '' window.open(?text=${encodeURIComponent(data.title)}&url=${encodeURIComponent(urlStr)}`, '_blank', 'toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=600, height=450, top=100, left=350')}

分享信息设置:

分享出去的样式包含图片,标题,简介

这些信息不是分享的时候设置的,是爬虫直接爬的分享链接页面head中预先设置好的分享信息,head配置如下

<meta name="twitter:title" content="realme Holi Game"><meta name="twitter:description" content="content"><meta name="twitter:image" content="xx.jpg"><meta name="twitter:card" content="summary">

Facebook登录方法之 cookies 登录

FaceBook登录的方法了。除了手机app登录之外,电脑端的登录有两种。

一种就是直接登录账号、密码。

另一种就是使用 cookies 来进行登录,需要使用Google浏览器和插件。

这个插件的名称:EditThisCookie,搜索一下,安装好就行了。

安装好之后,地址栏就会有一个按钮。

占击它,出来之后,其实核心就两个地方。

左边的圈是导入,右边的圈是导出。

账号咨询和购买

「链接」

比如:我们拿到的是带有Cookies的Facebook号码。

怎么登录呢?

打开facebook.com官网,确保网络是正常的,一定先用一些错误的账号密码,去随便的登录一下。切记、切记、

这样才是确保网络万无一失。

然后就选择导入你的Cookies,如下图片的这样的一串的代码,复制进去。点绿色确认键。

然后新开窗口访问facebook,你就会发现账号已经登录了。

同样的,我们也可以把我们已经登录的账号,导出cookies,这样就方便我们去另外的地方,电脑,网络。去登录这个账户。

它的好处就是稳定一些。

不至于会因为网络,地区,设备这些导致风控监测。

比如经常有号码登录时,需要验证邮箱之类的。

这种问题已经就可以解决了。

Twitter添加谷歌和Apple ID作为登录和注册选项,以让新用户更容易创建账户

据Engadget 8月2日报道,Twitter增加了两种用户登录账户的方式,从8月2日开始,用户可以使用谷歌ID通过其web客户端和移动应用程序访问该服务。与此同时,在iOS上,Sign in with Apple现在与Twitter应用程序合作,该公司计划很快”支持web登录服务,用户也可以使用这两种服务来创建一个新的Twitter账户。

图片来自:Engadget

在这两种选择中,Sign in with Apple更吸引人。苹果在2024年全球开发者大会上推出了这项功能,作为Facebook和谷歌登录服务的替代选项,苹果声称,Sign in with Apple”可以防止被跟踪,这项功能可以让用户通过生成二级地址来隐藏电子邮件,然后将任何来自应用程序和服务的邮件转发到你的常规收件箱。

不管怎样,Twitter添加对谷歌和苹果帐号的支持应该会让新用户更方便一些,但值得注意的是,Twitter仍然提供了自己的登录服务,互联网有时真是一个奇怪的地方。

(编译:晋阳)

未经允许不得转载: CIFCOM跨境电商 » 如何用谷歌账号登录line

相关文章

themebetter

contact