500 Error after Authorize App


Issue regarding a wordpress plugin called “Revive Old Posts”.
Haven’t been able to figure it out and the plugin author couldn’t help me either.
So it’s like this…
I press “Add twitter account”, I enter the necessary credentials ( API key/secret ) which are the correct ones.
Then it sends me to twitter page - “Authorize App”. After clicking on the button, it says “redirecting back” and then just throws 500 error.

In error logs I get this:

[01-Nov-2018 14:20:51 UTC] PHP Fatal error:  Uncaught exception 'Abraham\TwitterOAuth\TwitterOAuthException' with message 'Reverse auth credentials are invalid' in /data/web/blog.mywebsite.com/blog/wp-content/plugins/tweet-old-post/ven$
Stack trace:
#0 /data/web/blog.mywebsite.com/blog/wp-content/plugins/tweet-old-post/includes/admin/services/class-rop-twitter-service.php(97): Abraham\TwitterOAuth\TwitterOAuth->oauth('oauth/access_to...', Array)
#1 /data/web/blog.mywebsite.com/blog/wp-content/plugins/tweet-old-post/includes/admin/class-rop-admin.php(257): Rop_Twitter_Service->authorize()
#2 [internal function]: Rop_Admin->legacy_auth('')
#3 /data/web/blog.mywebsite.com/blog/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)
#4 /data/web/blog.mywebsite.com/blog/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#5 /data/web/blog.mywebsite.com/blog/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /data/web/blog.mywebsite.com/blog/wp-admin/admin.ph in /data/web/blog.mywebsite.com/blog/wp-content/plugins/tweet-old-post/vendor/abraham/twitteroauth/src/TwitterOAuth.php on line 168

Any clue, what might cause this? Thanks in advance.


This sounds like a callback URL issue.

I’m not sure how this plugin works. Can you please explain how you pulled the API keys and secrets that you used with the ‘Add Twitter account’ flow?


The callback url is https://www.mywebsite.com/blog/wp-admin/admin.php?page=TweetOldPost.

API key/secret comes from https://apps.twitter.com/app/xxxxxxxx/keys [Keys and Access Tokens].
At the very top there is Consumer API key and Consumer API secret, these are the ones I used.
If I enter random ones ( incorrect ones ), it won’t even let me get to the “Authorize App” part.


An update.
Locally it works fine for me, but on production server it throws the error ( same twitter apps account, just provided callback url for my localhost instead of the production one )
What could possibly be wrong on the server? What kind of restrictions?


Make sure that the registered URL on https://developer.twitter.com/en/apps is https://www.mywebsite.com/blog/wp-admin/admin.php without the ?page=TweetOldPost


Removed the ?page=TweetOldPost, still the same issue :frowning:
I can’t seem to figure this out, it has to be something with the server, since it works locally.


We’ve had a handful of people write in about this Wordpress recently. I have personally reached out to the developer via email and have not received a response. This is something that I believe that they are going to have to fix on their end.


Yea, the plugin author said, that he haven’t received anything from twitter staff :frowning:
Seems like a dead end, have to look for an alternative.


That’s unfortunate. If you can help provide me a solid email address for the developer, I can continue to help to investigate what is going on. Sounds like my previous attempts didn’t work out too well.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.