Closed Bug 487311 Opened 15 years ago Closed 15 years ago

AMO should support Twitter in its "Share this" menu

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rcampbell, Assigned: u278084)

References

Details

Attachments

(2 files, 1 obsolete file)

The Share This button doesn't support twitter.com. It should!
Summary: AMO should support Twitter in it's "Share This" menu → AMO should support Twitter in its "Share this" menu
I agree that this is a good idea, with the provision that user 2077082 does not have the Twitter option.
that's me, isn't it?
bug 491775 comment 0 has an example of the HTTP GET interface. Also, do we need to shorten the URL before sending it there, or do we let twitter handle this?
Depending on what is tweeted, we might hit the 140 character limit. The URL itself could be up to 53 characters long.
I agree. Unless I am mistaken, the whole "share this" menu is JS-based, so we might just want to hit up tinyurl (or whatever we prefer) with an AJAX request before sending it off to twitter. (Which leads me to a side question, does Mozilla have any very short domain that could be used as an in-sourced URL shortening service?)
It might also be worth the extra trouble to keep the shortened url in the db, or at least cached. is.gd has a limit of 5K requests per IP per day. tinyurl doesn't seem to have any limit.
We've found out yesterday that twitter does not actually limit the number of characters you submit. So we may just drop it in there and let the user shorten it if necessary. However, I am not sure how bad a UX that is.
The get interface lets the user edit the tweet after the fact.  I don't really
like url shorteners in general- the URL contains valuable information about
what it is and actually having links to AMO in twitter helps stuff like SEO. 
Why not just post the URL and the user can add in any additional information
they want.  Then we also don't have to worry about localization and people
don't just get a ton of "Check out this add-on!" in 50 languages.
Priority: -- → P2
Target Milestone: --- → 5.0.7
Target Milestone: 5.0.7 → 5.0.8
Attached patch v1 (obsolete) — Splinter Review
This isn't done because a sprite has to be modified to include twitter. There is some extra code in the share service to fix an issue I was having; I would get a status tweet with entities in them (ie. Foo - Bar)
Assignee: nobody → cdolivei.bugzilla
Status: NEW → ASSIGNED
Attachment #386217 - Flags: review?(jbalogh)
Comment on attachment 386217 [details] [diff] [review]
v1

Looks good to me once the sprite is updated.

>Index: site/app/controllers/addons_controller.php
>===================================================================
>--- site/app/controllers/addons_controller.php	(revision 28339)
>+++ site/app/controllers/addons_controller.php	(working copy)
>@@ -100,6 +100,12 @@
>             'friendfeed' => array(
>                 'label' => ___('addons_share_label_friendfeed', 'Share on FriendFeed'),
>                 'url' => 'http://friendfeed.com/?url={URL}&title={TITLE}'
>+            ),
>+
>+            // See Nick Nguyen

Why?
Attachment #386217 - Flags: review?(jbalogh) → review+
Thanks Jeff.  Ceasar: please wait until after 5.0.7 goes live before landing any code.
Whiteboard: [patch]
Patch had to be updated to support rtl languages, and because the sprite position was already taken.

(In reply to comment #11)
> (From update of attachment 386217 [details] [diff] [review])
> >+            // See Nick Nguyen
> 
> Why?

Because using a GET request to pre-fill your status is not mentioned in the Twitter API docs. And as Wenzel pointed out, Nick found this out in bug 491775 comment 0. That makes Nick our special Twitter API Doc :)
Attachment #386217 - Attachment is obsolete: true
Attachment #390148 - Flags: review?(jbalogh)
Attached image sprite
To be put in webroot/img/amo2009/icons/
Comment on attachment 390148 [details] [diff] [review]
updated patch for rtl

Thanks!  Good catch on the RTL.  I would put the offset at -1498px instead of -1500px; that makes the bottom of the twitter logo line up with our text.
Attachment #390148 - Flags: review?(jbalogh) → review+
Thanks Jeff, offset changed. Code changes in r30403. Locale changes in r30404.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
Whiteboard: [patch]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: