mgsisk / webcomic

Comic publishing power for the web. Turn your WordPress-powered site into a comic publishing platform with Webcomic.
http://wordpress.org/plugins/webcomic
GNU General Public License v2.0
110 stars 29 forks source link

403 error setting up Twitter #327

Closed tenorslowworm closed 6 years ago

tenorslowworm commented 6 years ago

I went through the steps to set up posting updates to Twitter, but instead of a sign-in button appearing after saving my Twitter settings, I got a "403: Forbidden" error.

I'm pretty sure I got my key and secret right, and my Twitter app is set up for read&write permissions with my site's URL (https://www.Trumpbert.com) set as the website and callback URLs.

Could it be that the callback URL needs to be exact? I was suspicious about entering just the site URL there as instructed by the wiki.

Thanks for any light you can shine on this.

mgsisk commented 6 years ago

Apologies for the trouble @tenorslowworm. The callback URL for your app being just your site URL is correct (technically, it's whatever home_url( '/' ) outputs). For authorization, Webcomic will construct an appropriate callback URL using your sites home_url( '/' ) based on whether pretty permalinks are enabled.

I think the actual issue in your case is whatever's redirecting the homepage to the latest comic URL. My guess is that, when Twitter tries to bounce back to your site, Webcomic isn't able to capture the authorization because an earlier redirect is shunting you off to the latest comic, bypassing the Webcomic's authorization hook. I'll see if I can dig a little deeper, but disabling the latest comic redirect, doing the Twitter authorization, and then re-enabling the redirect may work.

tenorslowworm commented 6 years ago

Ugh! I forgot about that bit of customization I made. Disabling it did indeed fix things. Thanks!