Skip to content

Format the tweet links according to the t.co recommendations #10

@ianchanning

Description

@ianchanning

Question from @patrickbootscec in #8 (comment) that should be a separate issue:

I was looking at the JSON that I guess the Twitter API is providing us and I noticed that there's a condition for "expanded_url" and "url" if the Tweet has a link in it. The documentation explains these differences, https://developer.twitter.com/en/docs/tco and also explains the "t.co" formats.

For the Twitter to RSS Parser, the function "processString" appears to handle this sort of thing:

Twitter-RSS-Parser/functions.php

return preg_replace('/https?:\/\/[\w\-\.!~#?&=+\*\'"(),\/]+/','<a href="$0">$0</a>',$s);

Is there a way to use the "expanded_url" condition for the text displayed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions