Processing
 

Twitter signin with JS and custom backend

25/08/2016 15:05#1

Joined at: 4 months ago

Post: 3

Thank: 0

Thanked: 0

I am facing stupid problems with twitter's OAuth 1 library, which is old and not very convenient in use (in comparison with OAuth2 by fb, g+ etc).

My problem is: on their website https://dev.twitter.com/web/sign-in/implementing they propose making a POST request in order to obrain request_token.

First of all, I only can make such request by XMLHTTPRequest, which returns the common error (I was expecting it)

XMLHttpRequest cannot load https://api.twitter.com/1.1/oauth/request_token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. 

I put the url of my website in the twitter-app settings. So, does anybody know how to make things work?

I also found a way like this (somewhere here, on StackOverflow): go to the page

https://twitter.com/oauth/request_token?oauth_callback=http://example.com/twitter-auth/&oauth_consumer_key={%my_key%} 

And this actually shows me token and token_secret, but does not redirect me on the callback url.

Which one should be used after all? And how make it work? :-)

Similar articles

How do twitter giveaways work?

8 months ago - Reply: 2 - Views: 126

How may I get genuine followers on Twitter?

3 years ago - Reply: 33 - Views: 1,828

Login to Twitter sometime fail

6 months ago - Reply: 1 - Views: 23

Twitter doesn't accept PHP's cURL, but Linux'

1 year ago - Reply: 2 - Views: 90

Twitter OAuth on iOS

5 months ago - Reply: 1 - Views: 92

why am i getting an error on .verifyCredentials()

5 months ago - Reply: 1 - Views: 35

TwitteR setup_twitter_oauth() gives an error

5 months ago - Reply: 1 - Views: 29

Tweepy - Getting the author of a retweeted tweet

5 months ago - Reply: 0 - Views: 4

Retrieving data from twitter with JavaScript

5 months ago - Reply: 0 - Views: 2

Combined social media feed returning the wrong data

5 months ago - Reply: 0 - Views: 0

Django and Twitter request_token

5 months ago - Reply: 0 - Views: 0

Python HMAC hashed value encoding to base64

5 months ago - Reply: 1 - Views: 32

At the rate symbol in facebook

5 months ago - Reply: 0 - Views: 1

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re