Twitter-Archive icon indicating copy to clipboard operation
Twitter-Archive copied to clipboard

Server not working

Open imnmo opened this issue 2 years ago • 8 comments

Hi,

I have followed all the commands and installed all the requirements, but after I run the server, I get the following error:

Screenshot 2022-09-17 at 09 12 12

Could you please help on resolving the error, the server was running on 8080

I also get the twitter APP side error like this Screenshot 2022-09-17 at 09 21 49

Any hep would be appreciated

imnmo avatar Sep 17 '22 07:09 imnmo

This looks like a CSRF token mismatch error. Which web browser are you using? Are you using any proxies?

jarulsamy avatar Sep 17 '22 20:09 jarulsamy

I tried in chrome (had adblocker and other extensions) & no proxies or firewalls

Switched to safari and tried again, same problem Screenshot 2022-09-18 at 13 15 58

imnmo avatar Sep 18 '22 11:09 imnmo

Also, I gave tried two options to populate client id and secret variables:

using export & using env variable both didn't work

I get error here:

File "/Users/imran/.pyenv/versions/3.9.2/lib/python3.9/site-packages/TwitterArchive/cli.py", line 185, in main client = auth(

imnmo avatar Sep 18 '22 11:09 imnmo

Hi @jarulsamy and @imnmo — I'm running into the same (or similar) issue here. When I run twitter-archive, I get a challenge URL that always gives me the "Something went wrong" page on twitter.

My first thought was disabling privacy-enhancing browser extensions, but that didn't work. Then I tried switching to firefox, but that didn't work either. I'm not 100% sure which set of tokens I'm meant to be using (I'm new to the Twitter API), so I've tried a) API key and secret, b) access token and secret, and c) client ID and secret. None of those worked.

Finally, I figured there might be an issue with using localhost, so I cloned and edited the source so that it spun up a server on 127.0.0.1:8080, but that didn't work either.

Any ideas as to how I could proceed from here? Really want to save my bookmarks if I can.

htried avatar Nov 11 '22 01:11 htried

@htried only solution for me was to use twitter bookmark save to notion https://github.com/twitterdev/bookmarks-to-notion and it worked

imnmo avatar Nov 11 '22 09:11 imnmo

Would it be possible for either one or both of you to post your system specifications, along with Python version, and the output of pip freeze --all? I am still unable to reproduce this error, so I suspect it is something system or version specific.

jarulsamy avatar Nov 11 '22 17:11 jarulsamy

I think the confusion here is the client ID/secret versus the Developer App Key and Secret.

Reading up on the OAuth docs, you can only get the client ID and key after you've completed the steps 1 and 2 of the 3-legged OAuth 1.0a flow.

The readme doesn't describe how to get from creating the developer app to generating these client IDs/secrets. I will try and figure it out and post back.

latagore avatar Nov 15 '22 04:11 latagore

I don't know how to do OAuth authentication without using a library. I think twitter-archive should perform steps 1 and 2 for you as well, and I'm not familiar with python to make a pull request to this repo..

I think there are steps missing before https://github.com/jarulsamy/Twitter-Archive#authentication-and-usage

Edit: for reference, Three-legged OAuth

latagore avatar Nov 15 '22 04:11 latagore