snarfed / bridgy

📣 Connects your web site to social media. Likes, retweets, mentions, cross-posting, and more...
https://brid.gy
Creative Commons Zero v1.0 Universal
722 stars 52 forks source link

Short URLs #173

Closed pfefferle closed 9 years ago

pfefferle commented 10 years ago

What do you think about using rel-shortlink for twitter-syndication?

snarfed commented 10 years ago

interesting! i'm open to it, but rel-syndication is already pretty standard for that. would that work? do you have a specific use case in mind?

pfefferle commented 10 years ago

No, the other way round... posting article/notes via webmention/bridgy to twitter or facebook. Would it help to use a short url to save some characters?

snarfed commented 10 years ago

ahhhh got it. good idea!

twitter converts all urls in tweets to t.co links, which all have the same number of characters, and facebook doesn't limit characters, so it doesn't matter for that.

some people might still prefer to use their short urls, though...? not sure.

snarfed commented 10 years ago

btw @pfefferle, if you're interested in contributing, this could be a great place to start! should be a straightforward addition to publish.py.

pfefferle commented 10 years ago

OK, I will have a look...

snarfed commented 9 years ago

sounds like @singpolyma would like this too (#422).

@singpolyma, out of curiosity, what's your use case for short urls? i'm always curious since twitter now t.co-wraps all links, so their length no longer matters, and no other supported silos limit chars.

btw, you can currently get bridgy to use a short link when publishing if you put the short link into the interactive UI instead of the full link, or use it as the source param if you're webmentioning. https://www.brid.gy/about#short-link

singpolyma commented 9 years ago

It's about visual noise. If I post "it sure is hot outside" then a Facebook post like:

it sure is hot outside

(Original Link: https://singpolyma.net/2015/06/it-sure-is-hot-outside)

Just looks excessive...

Also, on twitter, I use algorithmic shorturls that I would prefer be displayed rather than t.co links (though of course it will be wrapped in t.co underneath in official clients)

dissolve commented 9 years ago

I think this is a good idea, it may not be too easy to send the shortlink in the webmention in your system.

snarfed commented 9 years ago

note to myself: i think we can find the shortlink(s) in a page with just:

soup.find_all('link', rel='shortlink') +
  soup.find_all('a', rel='shortlink') +
  soup.find_all('a', class='shortlink')
snarfed commented 9 years ago

quick survey! rel-shortlink, which @pfefferle mentioned, is evidently the standard (or close enough).

looking at recent posts from the three people who requested this:

@pfefferle has:

@singpolyma has:

@dissolve has:

looks like shortlink is the winner. sorry @singpolyma! you'll want to update your markup if you still want to use this feature.

kylewm commented 9 years ago

class="shortlink" is hAtom/mf1, and we should probably add it to backcompat parsing of mf2py instead of to Bridgy.

snarfed commented 9 years ago

evidently the way to get a feature into bridgy is to have three different people ask for it. :P