加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – Ionic Framework Twitter集成

发布时间:2020-12-17 17:49:33 所属栏目:安全 来源:网络整理
导读:我目前正在开发一个项目,我必须使用Ionic Framework进行twitter集成. 我正在使用离子论坛的示例程序:http://forum.ionicframework.com/t/twitter-integration-with-jsoauth/3936 可在bitbucket获得:https://bitbucket.org/aaronksaunders/ionic.twitter.sa
我目前正在开发一个项目,我必须使用Ionic Framework进行twitter集成.

我正在使用离子论坛的示例程序:http://forum.ionicframework.com/t/twitter-integration-with-jsoauth/3936

可在bitbucket获得:https://bitbucket.org/aaronksaunders/ionic.twitter.sample

我已经用两种方式对它进行了测试,即使用离子服务和模拟器,但结果相同:每当我点击登录时,新的浏览器窗口都有地址:https://api.twitter.com/oauth/authorize?出现包含以下错误消息.

Whoa there!
There is no request token for this page. That's the special key we need
from applications asking to use your Twitter account. Please go back to
the site or application that sent you here and try again; it was probably 
just a mistake.

我已将twitter API密钥和API密钥放在适当的位置.

解决方法

我其实喜欢使用 hello.js.

这是一个很棒的图书馆,可以为您处理社交媒体令牌.

示例初始化:

hello.init({
    facebook : '12345678912345'
},{
    // Define the OAuth2 return URL
    redirect_uri : 'http://adodson.com/hello.js/redirect.html'
});

登录:

hello( "facebook" ).login().then( function(){
    alert("You are signed in to Facebook");
},function( e ){
    alert("Signin error: " + e.error.message );
});

登录后,您可以拨打您选择的社交媒体帐户.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读