You no longer have to shorten an URL before sending it to Twitter...
but if you do such, realizing perfect is not the goal, you should do
reasonable dueDiligence on the quality of the URL.

Take a look at the Twitter iPhone app.  Enter a URL and watch how it
deals with character counts.

On Mar 4, 8:11 am, Per Bull Holmen <pbhol...@gmail.com> wrote:
> Den 04:27 4. mars 2012 skrev R <r4eem...@gmail.com> følgende:
>
> > All good, valid and useful points.
>
> > However, I would at least like to maintain the same functionality of
> > the Twitter App for iPhone.
>
> > The app does does a pretty good job of detecting and reviewing the URL
> > to determine if it can be assumed to be 20 characters.
>
> Let me ask a few stupid questions, because sometimes stupid questions
> can be helpful:
>
> 1) You want to make an app that lets the user post messages on twitter, right?
> 2) When URLs are posted on twitter, they are automatically shortened
> to some bit.ly or similar type of address, right? Or are you planning
> to do the shortening yourself?
> 3) You want to determine in advance whether an URL will be shortened,
> right? Perhaps to give better feedback to the user about how many
> characters the user has left?
>
> I say this is impossible to do perfectly, unless Twitter has some
> special service for developers who struggle with this problem. Perhaps
> they have some http-based interface to determine if an URL will be
> shortened, I don't know. Perhaps they have a specification of how they
> determine what URLs to shorten.
>
> There has been some discussion about whether to do a DNS lookup. There
> are good reasons to avoid it, but any solution will have its flaws
> anyway. How about you start with a valid URL, then you introduce a
> spelling error in the host name, and use the "host" command, or
> "nslookup" from terminal to determine that the new host name really is
> unregistered. Then you type in your full URL including typo into your
> reference app, and see whether it is interpreted as a URL that can be
> shortened. Then you'll know whether that app does use DNS lookups to
> determine it.
>
> Apart from that, since you haven't seen a satisfactory response on the
> list yet, I think there is no Cocoa-specific solution. Therefore I
> think you will get better help in a more general technical forum, such
> as stackoverflow.
>
> Per
>
> _______________________________________________
>
> Cocoa-dev mailing list (cocoa-...@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your 
> Subscription:https://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev-garchive-...
>
> This email sent to cocoa-dev-garchive-98...@googlegroups.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to