Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Framework Twitter integration

I am presently working on a Project in which I have to use Ionic Framework for twitter integration.

I was using a sample program from ionic forum: http://forum.ionicframework.com/t/twitter-integration-with-jsoauth/3936

available at bitbucket: https://bitbucket.org/aaronksaunders/ionic.twitter.sample

I have tested it in both way i.e. with ionic serve and on the emulator, but with the same result: whenever I click on the login a new browser window with adrress: https://api.twitter.com/oauth/authorize? appears that contains the below error message.

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.

I have placed my twitter API Key and API Secret at proper places.

like image 412
Rivu Chakraborty Avatar asked Feb 11 '23 02:02

Rivu Chakraborty


1 Answers

I actually like using hello.js.

It's a great library that handles your social media tokens for you.

Example Initialization:

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

Login:

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

After you've logged in, you can make any call to your social media account of your choice.

like image 132
Puma Avatar answered Feb 16 '23 10:02

Puma