Initial setup of twitter connect for self hosted instance

I finally did setup from github on a standalone vhost a running newsblur for my personal use. Thanks for that package so far.

Now I would like to connect to twitter and facebook. I’m a bit lost in configuring this.
I had some other oauth connections to twitter so I tried to reuse one of my app configs there and added TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET in the file newsblur_web/docker_local_settings.py, is that so far right?

Now I was at least greated by twitter in a popup with the name of my twitter app and could click allow. But it only displayed me a numeric to to enter back in the app, where I for sure have no place to enter this.

Any howto for the standalone setup on this part?

Might be related to some error I see in my browser console when opening the follow popup:

Because I can see a rotating circle after accepting the connection to twitter and closing that additional window. I expect it would have communicated back to that popup if it had no error on startup, right?

Might be related to some error I see in my browser console when opening the follow popup:

Good catch! I just fixed this error and pushed to master, so pull and retry.

I had some other oauth connections to twitter so I tried to reuse one of my app configs there and added TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET in the file newsblur_web/docker_local_settings.py, is that so far right?

Well the truth is that you’ll need to make an app on Twitter as a developer and use those credentials. But if you have other credentials, I would think you’re free to use them. But how do you have those? From another project or something?

Those aren’t the same as access tokens, which are the credentials you might already have. You need to be able to produce access tokens, not just consume access tokens you have on hand. To generate them, you need to create that Twitter app using their developer API. These NewsBlur credentials are for that app. It’s not hard to do, but it does take a minute.

I set one up for local development, so you can get away with some localhost redirects. Actually, come to think of it, I believe I added an nb.local.com entry to my /etc/hosts and sent Twitter there, so there’s that secret knowledge as well.

I now created a dedicated twitter app for that purpose. What I still don’t know is what to enter as callback URLs within twitter development console.
As far as I did know that protocol, twitter calls back a URL after the user accepts that connection in the popup window. Does NewsBlur have a callback URL anywhere? Or how do you enter that authorization number back to the system?

And what Twitter API version is used? 1.1 or 2?

I love reading source, no, really!

Now it worked, I used the right callback URL within the twitter app:
https:// thatdomainofmine/oauth/twitter_connect/

And now it is connected! (I used OAuth 1.0a, as “new” APIs most times run into trouble.)

Glad that worked! How did you figure out the right callback url? You kinda have to know to go to apps/oauth/urls.py. Was it specified anywhere?