Ionic framework 将twitter connect插件与Ionic2一起使用时登录会话失败
我尝试使用twitter连接插件,但它不起作用 i'v错误Ionic framework 将twitter connect插件与Ionic2一起使用时登录会话失败,ionic-framework,ionic2,ionic3,Ionic Framework,Ionic2,Ionic3,我尝试使用twitter连接插件,但它不起作用 i'v错误登录会话失败 我还拿到了织物钥匙 因此,任何解决方案都需要获得twitter身份验证并使用它登录。 这是我的代码: loginWithTwitter(){ this.tw.login().then(function(result) { console.log(result); //Get user data this.tw.showUser().then(function(user){ //Sav
登录会话失败
我还拿到了织物钥匙
因此,任何解决方案都需要获得twitter身份验证并使用它登录。
这是我的代码:
loginWithTwitter(){
this.tw.login().then(function(result) {
console.log(result);
//Get user data
this.tw.showUser().then(function(user){
//Save the user data in NativeStorage
this.storage.setItem('twitter_user',
{
name: user.name,
userName: user.screen_name,
picture: user.profile_image_url_https
}).then(function() {
console.log("twitter");
})
}, function(error){
});
})
}
这是我的配置文件
<plugin name="twitter-connect-plugin" spec="https://github.com/chroa/twitter-connect-plugin">
<variable name="FABRIC_KEY" value="ddb30e3efa7732b38e327c75a3ce57fd4c688ee1" />
<variable name="TWITTER_KEY" value="twitter key" />
<variable name="TWITTER_SECRET" value="twitter secret" />
</plugin>
有什么解决方案吗?对我有效的方法是将回调URL设置为
twittersdk://
,并从以下位置使用Twitter登录:
来源:我使用的是爱奥尼亚4号,但我在爱奥尼亚3号上也遇到了同样的问题。而不是在config.xml中添加以下内容
loginWithTwitter()
是用typescript
或javascript
编写的?@hrdkissback typescriptIntypescript
我认为应该是。然后((用户)=>不是。然后(函数(用户)
。不,这不是问题。感谢您的回答。添加twittersdk://作为回调URL使事情再次正常工作。非常感谢:)我们如何获得FABRIC\u密钥?请详细解释。提前感谢。在使用新的Twitter API时,首选项非常有帮助