Bug 367773 - Use t.co URL resolution provided by the Twitter API
Summary: Use t.co URL resolution provided by the Twitter API
Status: REPORTED
Alias: None
Product: choqok
Classification: Applications
Component: Twitter (show other bugs)
Version: Git
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Mehrdad Momeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-24 18:57 UTC by Benedikt Gollatz
Modified: 2016-08-25 04:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benedikt Gollatz 2016-08-24 18:57:09 UTC
Twitter provides resolution of external t.co links in the "entities" part of the API response. choqok should make use of this information.

Reproducible: Always

Steps to Reproduce:
1. Create a Twitter account in choqok.
2. Look at a tweet that contains a URL referencing a resource outside of Twitter.
3. Notice choqok displays an unresolved t.co link instead of a link to the real resource.

Actual Results:  
No resolution of t.co URLs.

Expected Results:  
t.co URLs should be resolved to their real target and displayed as such.

I have submitted a patch for this issue on the KDE review board with review request #128748: https://git.reviewboard.kde.org/r/128748/

I realise I'm somewhat late in the 1.6 development cycle with this, but since longurl.org is gone and the associated URL resolution plugin has stopped working, this patch brings back some of the lost functionality.
Comment 1 Mehrdad Momeny 2016-08-25 02:41:38 UTC
Oh, I didn't notice longurl.org is gone out of business.
I'll check this. But so far Choqok was not replacing short URLs with the longer ones, because that can cause a long text in tweet and not with the shorter version that Twitter shows. But the tooltip used to show the longer URL.
We need to decide whether to change it to show something like Twitter or not.
Comment 2 Benedikt Gollatz 2016-08-25 04:26:11 UTC
My patch on reviewboard does exactly that, as Twitter provides both versions (the one they display and the real expansion). The real expansion shows up as the tooltip and the href, and the shortened expansion is used to display the link in the PostWidget.
Comment 3 Mehrdad Momeny 2016-08-25 04:29:12 UTC
Yes, I understood, and that's my point, Choqok has not been following twitter in this matter. And that's the thing that might change.
But we need to consider all cases and microblog services that Choqok supports, not only twitter, and have a solution that fits all.