Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400 when there's a twitter link in a post #57

Closed
jasonrbriggs opened this issue Aug 25, 2019 · 10 comments
Closed

Error 400 when there's a twitter link in a post #57

jasonrbriggs opened this issue Aug 25, 2019 · 10 comments

Comments

@jasonrbriggs
Copy link

Getting the following error when sending a webmention for a new post if there's a twitter link in the post:

$ curl -X POST -si https://fed.brid.gy/webmention -d source=http://jasonrbriggs.com/micro/2019/08/17/101611.html -d target=https://fed.brid.gy
HTTP/2 400 
content-type: text/html; charset=UTF-8
x-cloud-trace-context: 0e4211e0cb9179cb9eb7d6908caecc18;o=1
date: Sun, 25 Aug 2019 09:12:02 GMT
server: Google Frontend
content-length: 314

<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
Target post https://twitter.com/BillyBobSanderz/status/1159469980435374080 has no Atom link

And looking at the logs (https://fed.brid.gy/log?start_time=1566724322&key=http%3A%2F%2Fjasonrbriggs.com%2Fmicro%2F2019%2F08%2F17%2F101611.html+https%3A%2F%2Ftwitter.com%2FBillyBobSanderz%2Fstatus%2F1159469980435374080) it then looks like that's stopping further federation of my post. At least I think so -- obviously still having this weird issue (#56), so don't know if the error 400 breaks federation or the post isn't appearing because of issue #56.

@snarfed
Copy link
Owner

snarfed commented Aug 25, 2019

this one is at least easier to explain. the Twitter link isn't just a link, it's a u-repost-of. bridgy fed supports actual AP replies, likes, and reposts, so it complains if you try to repost a non-AP post.

i can definitely work on improving the error message!

@jasonrbriggs
Copy link
Author

The problem I see, is that from the perspective of my static generator, it won't necessarily know if the u-repost-of target (or in my case, u-like-of) supports AP or not. Twitter is easy, but thinking of other sites where you might create post with a u-like-of link, but the target site doesn't support activitypub. I would've thought annotating the links with the microformat indicates the intent, so not quite sure if adding logic to the generator to detect if the target site is AP-aware makes sense...?

@snarfed
Copy link
Owner

snarfed commented Aug 25, 2019

before we get too deep into plumbing, how would you want bridgy fed to federate this post? ie how would you expect it to look in Mastodon?

it's a repost, but it can't be federated as an AP repost (boost). it's not a note, so bridgy fed is reluctant to downgrade/convert it to one. I'm guessing you'd be ok with that, but I don't know that everyone would be...

@jasonrbriggs
Copy link
Author

So I've posted the entire content of the original tweet, along with a link which (you were right all along) I'd annotated with u-repost-of. Yes I'd be fine with a downgrade/conversion to note in this case. In terms of whether that would be acceptable to others, what do you think the objection would be?

@snarfed
Copy link
Owner

snarfed commented Aug 25, 2019

basically, it adds user confusion and surprise. we're used to reposts being distinct things in silos like Mastodon and Twitter, but this wouldn't correctly replicate that. the problem gets worse with other types like likes and rsvps, and for most other users whose reposts etc often aren't formatted as notes like yours is.

for more context, people have also requested this kind of thing in bridgy itself. lots of discussion in eg snarfed/bridgy#362 and snarfed/bridgy#527 . I've avoided adding it there so far too.

@jasonrbriggs
Copy link
Author

I guess that makes sense, but it does mean I can't annotate my site with microformats consistently. If it's an AP target I can annotate with u-repost-of, otherwise not.

@snarfed
Copy link
Owner

snarfed commented Sep 3, 2019

you're welcome to leave the twitter u-repost-of in and just not send a webmention to bridgy fed, if you want. the post obviously then wouldn't get federated to Mastodon though. not sure which side of that tradeoff you prefer.

tentatively closing. sorry i don't have better news here. feel free to add more thoughts!

@snarfed snarfed closed this as completed Sep 3, 2019
@jasonrbriggs
Copy link
Author

FYI, I've gone with the approach of my site generator identifying whether the target supports webmentions, and then not annotating with u-repost-of or u-like-of, if they don't (given my preference is for bridgy fed to federate to mastodon, etc in the end).

@snarfed
Copy link
Owner

snarfed commented Sep 7, 2019

ok!

out of curiosity, i take it that means even when you're reposting a tweet, you'd rather federate it to Mastodon than actually retweet it on Twitter? totally ok if so, just curious.

@jasonrbriggs
Copy link
Author

jasonrbriggs commented Sep 7, 2019

Well I don't have a twitter account any more after an attack of pique at one point. I don't have a mastodon account either (other than a dummy test account that I use to check my posts), but federating to mastodon is at least a nod in the direction of the open/indie web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants