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

Handle Twitter URLs #187

Open
leyla-yazdan-hs opened this issue Nov 23, 2016 · 7 comments
Open

Handle Twitter URLs #187

leyla-yazdan-hs opened this issue Nov 23, 2016 · 7 comments

Comments

@leyla-yazdan-hs
Copy link

Twitter changes a base URL to a t.co URL. Implement a way of handling that to show the original URL not the t.co URL.

@leyla-yazdan-hs leyla-yazdan-hs changed the title Handle Twitter URL's Handle Twitter URLs Nov 23, 2016
@gregjacobs
Copy link
Owner

Hey, not sure if I'm following exactly. Can you give an example of what is currently happening, and what you would like to happen instead?

@olafleur
Copy link
Collaborator

From what I understand, if you have a http://t.co/foo that points to http://theoriginalurl.com it should link but also change the text of the url to http://theoriginalurl.com .

That would at least require a fetch, right ?

Should we then also do that for every shortener ? (bit.ly, etc.)

Just thinking out loud here.

@julesforrest
Copy link

Yeah, I'm running into this issue too.

If I'm using autolinker on a Twitter bio with a link, it replaces the original text to be linked with t.co/, which loses all the context.

Example:

Rendering 3dfordesigners.com ! 3D, visuals, interactive art; creative discipline from a technologist's perspective. Prev. @dropbox, @github, @Codecademy.

Becomes:

Rendering t.co/dYunthyTN7! 3D, visuals, interactive art; creative discipline from a technologist's perspective. Prev. @dropbox, @github, @Codecademy.

@gregjacobs
Copy link
Owner

Is this still an issue? There's nothing in the Autolinker code that would convert a twitter url to t.co, so I'm not really understanding. Feel free to reopen with a better description though.

@swyxio
Copy link

swyxio commented Jun 12, 2022

@gregjacobs, I have this problem right now. Twitter's t.co link shortening is user unfriendly because it adds tracking, latency, and makes the url opaque. (docs, docs)

Autolinker could add an async process to send a ping to the t.co url, and get back the redirect header to unfurl this URL to something more user friendly.

@gregjacobs
Copy link
Owner

Ah! Ok, now I'm understanding. The ask is basically that Autolinker attempts to resolve t.co URLs to follow to the full URL that they point to.

So this is actually a decent amount of work to refactor Autolinker into an async utility that can handle something like this. Unfortunately I don't get a whole lot of time to work on Autolinker as it is, so PRs definitely welcome

@gregjacobs gregjacobs reopened this Jun 13, 2022
@swyxio
Copy link

swyxio commented Jun 18, 2022

I ended up postprocessing autolinker output as seen in the blogpost above but it's certainly not as elegant as making autolinker take async haha

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

5 participants