gabipurcaru / followgraph

MIT License
207 stars 22 forks source link

Doesn't work on my account? #10

Open elfprince13 opened 1 year ago

elfprince13 commented 1 year ago

Inputing my handle elfprince13@mumak.app, returns the following message:

No results found. Please double check for typos in the handle, and ensure that you follow at least a few people to seed the search. Otherwise, try again later as Mastodon may throttle requests.

additionally, one 1 warning:

Found 1 warnings: Error while retrieving followers for elfprince13@mumak.app.

Not sure why this would be happening as my social graph is available unauthenticated.

wernersv commented 1 year ago

Same here. I'm using an account on mastodon.online

yllekz commented 1 year ago

Same with infosec.exchange

mephinet commented 1 year ago

Same error message when using on my account, mephinet@wien.rocks. Javascript console reports:

Get page: https://wien.rocks/api/v1/accounts/109264877250127387/following
index-62bb3d1e89a843df.js:1          GET https://wien.rocks/api/v1/accounts/109264877250127387/following 401
d @ index-62bb3d1e89a843df.js:1
await in d (async)
h @ index-62bb3d1e89a843df.js:1
j @ index-62bb3d1e89a843df.js:1
onSubmit @ index-62bb3d1e89a843df.js:1
eV @ framework-114634acb84f8baa.js:9
eW @ framework-114634acb84f8baa.js:9
(anonymous) @ framework-114634acb84f8baa.js:9
rn @ framework-114634acb84f8baa.js:9
rt @ framework-114634acb84f8baa.js:9
(anonymous) @ framework-114634acb84f8baa.js:9
oN @ framework-114634acb84f8baa.js:9
eF @ framework-114634acb84f8baa.js:9
ri @ framework-114634acb84f8baa.js:9
nV @ framework-114634acb84f8baa.js:9
nI @ framework-114634acb84f8baa.js:9
index-62bb3d1e89a843df.js:1 eeeee Error: HTTP request failed
    at d (index-62bb3d1e89a843df.js:1:919)
    at async h (index-62bb3d1e89a843df.js:1:1362)
    at async j (index-62bb3d1e89a843df.js:1:2438)

The request fails with a 401 and doesn't include any Authorization header...

mephinet commented 1 year ago

Honestly, after reading through the code and the API documentation of the following endpoint, I'm not entirely sure how the code is supposed to work, as an Authorization is required for this endpoint, but accountFollows does not provide any...

gabipurcaru commented 1 year ago

@mephinet, the documentation is definitely confusing; it says "OAuth: Public", but then says the authorization header is required. Regardless, the actual API does not require the header, most of the time.

Problems may arise when either there's a non-standard Mastodon server or if it chooses to throttle the request. I'll look into mitigating this, thanks for flagging!

blackspike commented 1 year ago

or mastodon.cloud!

mrehler commented 1 year ago

Can echo having issues over on Mastodon.cloud. Would love to make use of the service!

mattlehrer commented 1 year ago

You need both "Suggest account to others" checked and "Hide your social graph" unchecked for a service like this to work. I think it's a bug for Mastodon not to give access to your social graph through the API but to allow access on the web when you have both unchecked, but that's the current status.

I am working on another project like this that does currently work with Pleroma and Friendica at github.com/mattlehrer/whomtofollow and would love to get this kind of search working for more people.

blackspike commented 1 year ago

Hmm both those are already checked/unchecked as your recommend on mastodon.cloud

mattlehrer commented 1 year ago

You're right. Sorry. It looks like mastodon.cloud does not allow access to the following list without an access token, even though it's public on the web.