2

i have a simple question:

I can´t force the [UIApplication sharedApplication] openUrl: to open the url in the web navigator, always open the Facebook app and don´t go to the facebook pages.

Erusso87
  • 667
  • 1
  • 7
  • 19

3 Answers3

7

I solve this problem adding the "?ref=0" in the url. It's works.

Erusso87
  • 667
  • 1
  • 7
  • 19
0

I don't know what Facebook url are you using, however, to open Facebook in Web Navigator I'm using:

http://www.facebook.com/pages/DrMama/582190345150285

then:

fbProfile = @"http://www.facebook.com/pages/DrMama/582190345150285";
NSURL *fbURL = [NSURL URLWithString:fbProfile];
[[UIApplication sharedApplication] openURL:fbURL];

That is opening Web Navigator without problem.

Gabriel.Massana
  • 8,165
  • 6
  • 62
  • 81
  • Thanks, yes I know... but if you have the Facebook App installed it's open that app. – Erusso87 Mar 19 '14 at 11:51
  • No. With Facebook App installed, and calling a Facebook url with this format: http://www.facebook.com/pages/DrMama/582190345150285 my app is opening Safari. – Gabriel.Massana Mar 19 '14 at 11:54
0

I use URL shortener to get around. There are a lot e.g. https://bitly.com/, http://goo.gl/

Bitly shortens a Facebook url to "http://on.fb.me/abc123", so it doesn't look that ugly. It even looks better than Google URL shortener in fact :)

Hlung
  • 13,850
  • 6
  • 71
  • 90