1

I have a huge link. I want to share this link when a user in my app posts to facebook from within the app. However my link is too large so I'd like to shorten it. Is there anyway (natively) I could have something like "Download the app HERE" where HERE redirects to my super long link?

Tyler Pfaff
  • 4,900
  • 9
  • 47
  • 62
  • possible duplicate of [UIActivityViewController with HTML](http://stackoverflow.com/questions/12658248/uiactivityviewcontroller-with-html) – David Berry Apr 24 '14 at 22:16
  • What's not mentioned in the referenced answer is the possibility of using the new Social.framework to post specifically to Facebook. – David Berry Apr 24 '14 at 22:19
  • It seems the only method for URLs in Social.framework is -(BOOL)addURL:(NSURL *)url, which doesn't look like it supports what I want to do (adding a link to a link). – Tyler Pfaff Apr 24 '14 at 22:41
  • May have to fall-back to using the [Facebook API](https://developers.facebook.com/docs/ios) directly. Which is more or less what the other link suggests as well :) – David Berry Apr 24 '14 at 22:42
  • Dang, I need to do this for facebook,twitter, email, mms, etc. – Tyler Pfaff Apr 24 '14 at 22:46
  • Which is why activity provider (and social) don't have it. Each service has a completely different (if any) way of doing it. – David Berry Apr 24 '14 at 22:48
  • One thing you might consider, especially if you already have a server, is providing or using some kind of url shortening service such as [Google's](https://developers.google.com/url-shortener/) – David Berry Apr 24 '14 at 22:50

1 Answers1

0

What you're looking to do really can't be done with UIActivityViewController since each service has a completely different mechanism for encoding/representing links. Your best is probably to use some kind of URL shortening service such as Google's

David Berry
  • 40,941
  • 12
  • 84
  • 95