echofox-team / echofon-firefox-unofficial

Echofon Unofficial - maintained version of Echofon: full featured, super clean Twitter app for Firefox.
http://echofox-team.github.io/echofon-firefox-unofficial/
69 stars 10 forks source link

Error - Using Echofon with Waterfox - "Failed to get OAuth token. Try this later." #85

Open etachyon opened 4 years ago

etachyon commented 4 years ago

Tweets stopped loading few days back. I tried to remove and add account but I get an error message saying "Failed to get OAuth token. Try this later." Thanks for your support.

potamgsf commented 4 years ago

Me too... Probably this is it? ss

Kyleri commented 4 years ago

Well ... crap. Anyone know if a fix is possible? Or has Twitter just locked our butts out permanent-like?

tetsujin1979 commented 4 years ago

I've tried looking at this. Debugging the plugin is tricky. I think the address is ok, it might be a change on twitter itself. I tried registering a new application with the twitter API, but getting this result - "401 Unable to authenticate you" If I had to guess the problem is in either the TwitterClient.requestToken or TwitterClient.buildOAuthHeader functions, or in the OAuth.js file

That "Failed to get OAuth token" error message is triggered on line 32 of OAuth.js so maybe we can work back from there?

tetsujin1979 commented 4 years ago

I've opened a question on stackoverflow here - https://stackoverflow.com/questions/59953187/how-to-authenticate-with-twitter-from-a-firefox-plugin - to ask for help on fixing the authentication issue

Kyleri commented 4 years ago

Oh good -- thank you! This is WAY beyond my clue, but I can sit on the sidelines & cheer you on. \o/

tetsujin1979 commented 4 years ago

hasn't been any responses. If any of you have a stack overflow account, can you click the upvote arrow?

potamgsf commented 4 years ago

tetsujin1979 done.

I tried to find if there was any changes about the authentication recently but I found nothing. I can't even find the cause of this problem... :(

YoruNoHikage commented 4 years ago

Hello guys, I think the official Echofon keys have been revoked or disabled. In the past, I made a specific version with custom keys (see #46) I never published because there were no UI for this.

I got some time to look for it and it still works in Waterfox (even though some API endpoints have been removed). So if you have custom keys (you can ask for on developer.twitter.com), you can use it. echofon_unofficial-2.6.4-custom-keys.zip.

Steps to install:

  1. Rename zip extension to xpi
  2. Load the add-on onto Waterfox
  3. Go to about:config et replace extensions.twitternotifier.customKey and extensions.twitternotifier.customSecret with the consumer key and secret from developer.twitter.com

You should be able then to add your accounts and complete the auth process (and you have to remove/re-add the existing ones).

EDIT: Do not check "Sign-in with Twitter" and leave callback blank when creating the app. See below https://github.com/echofox-team/echofon-firefox-unofficial/issues/85#issuecomment-581840598

potamgsf commented 4 years ago

It's shame... :(

tetsujin1979 commented 4 years ago

Not quite working for me. I've set the two key values in about:config, and I can log in through the "Add Account" link, but when I complete the login to twitter, it redirects back to the github page, there's no PIN code, so the account is not added successfully

I think the problem is that I've set the callback url for the new app I registered on dev.twitter.com to https://github.com/echofox-team/echofon-firefox-unofficial

YoruNoHikage commented 4 years ago

There's no callback assigned on my app, are you able to leave it blank?

tetsujin1979 commented 4 years ago

I had the "Sign in with Twitter" option selected, once I cleared that I could leave a blank callback url, and everything is working now! Thank you so much, I really appreciate the effort you've put in to get the add on working again

tetsujin1979 commented 4 years ago

These are the steps that I followed

Register as a developer at developer.twitter.com Login at developer.twitter.com Under your username in the top right, click "Apps" Click "Create an app" Enter any name - there are some restrictions, it can't have "Twitter" in it, and it must not be the same as an existing app, so it might take a few tries before you enter a name that's available Enter a short description, this can be anything Enter a website URL, I used the repository address, that should be ok Leave "Enable Sign in with Twitter" clear Leave all following fields blank, except for "App usage". This needs a short description of how the app will be used, so something like "To access twitter via a browser plugin" Click create Wait for the application to be created If you can't see the "Keys and tokens" tab, click the "Details" link next to the app name Under "keys and tokens" note the API key and API secret key Download the zip file from the link above Rename the ".zip" extension to ".xpi" Drag the xpi file into Waterfox and install Restart to complete installation When waterfox restarts, open a new tab and enter "about:config" in the address bar Click "I accept the risk" Enter extensions.twitternotifier.customKey in the search box If the preference is not found, right click on "Preference Name" and select "New -> String" and enter extensions.twitternotifier.customKey as the preference name and the value of the API key from your new twitter application as the value If it does exists, edit it and enter the value of the API key from your new twitter application as the value

Enter extensions.twitternotifier.customSecret in the search box If the preference is not found, right click on "Preference Name" and select "New -> String" and enter extensions.twitternotifier.customSecret as the preference name and the value of the API secret key from your new twitter application as the value If it does exists, edit it and enter the value of the API secret key from your new twitter application as the value

Close the tab

You should be able to register accounts with echofon, and use the add on as before

YoruNoHikage commented 4 years ago

@tetsujin1979 glad it worked!

potamgsf commented 4 years ago

I tried to newly register, and create an app... NOW IT WORKS COMPLETELY FINE AGAIN! Thank you so much!

us66mo commented 4 years ago

@tetsujin1979 Works great, also on Palemoon! Thanks for the help! Although I requested DM to work as well (with tweeting and retweeting), it doesn't seem to work yet, but that's no big deal.

Kyleri commented 4 years ago

IT WORKS

Many thanks to @YoruNoHikage for fixing the code & to @tetsujin1979 for posting the delightfully detailed howto -- y'all rock!

RichDG commented 4 years ago

A real shame this no longer works in firefox. Thanks for all the work over thre years maintaining this app, I am going to miss it (to such an extent my twitter usage will drop to next to notihng I imagine).

tetsujin1979 commented 4 years ago

A real shame this no longer works in firefox. Thanks for all the work over thre years maintaining this app, I am going to miss it (to such an extent my twitter usage will drop to next to notihng I imagine).

There's a fork of Firefox called Waterfox that still supports the older style add-ons, that's what I use to run echofon, plus a few other add-ons that no longer run in firefox

tetsujin1979 commented 4 years ago

@tetsujin1979 Works great, also on Palemoon! Thanks for the help! Although I requested DM to work as well (with tweeting and retweeting), it doesn't seem to work yet, but that's no big deal.

That was a change introduced by Twitter about a year ago, you can't access DMs using the API anymore. It's not a massive issue for me either, I can still use the app for that.

RichDG commented 4 years ago

Thanks, I am aware of both Waterfox and Pale Moon working with the changes made as per your suggestion. Unfortunately I need echofon to work on my main browser (firefox) and not on a back up browser. Thankfully since posting earlier I thought I would try the tweaks for Waterffox etc on my version of Firefox (I use version 47.0.2 due to other add ons no longer working with later versions of ff). I did the regsitering, app creation etc and installed the file after changing it from a zip to an xpi file. I then did the changes to the config (adding both entries as neitehr were there). It didn't seem to work so then I tried tweeting from echofon and once that appeared it suddenly kicked into life so it does seem to work on older versions of ff (albeit very old !!). Thanks for putting such full instructions up, I know I never would have managed it without such a comprehensive guide.

us66mo commented 4 years ago

As an addendum, it is working fine except for the fact that is seems to revert to an earlier date when I restart the browser, giving me a false number of new twitter messages.