1

I am using facebook unity sdk in my ios game made using unity. I have a code in my game,

void OnClick() {
    Application.OpenURL("https://www.facebook.com/roadsmash");
}

which leads to group in facebook.

Facebook plugin detects all facebook links and opens native app if possible. The problem is native app is opening somewhere else, not in my group page. How can I open my group page in native app or can I open page in browser, not by opening fb native app?

Lex Li
  • 60,503
  • 9
  • 116
  • 147
Rustam Ganeyev
  • 894
  • 2
  • 12
  • 29
  • What platform are you seeing this problem on? – benp Jan 31 '14 at 19:49
  • @benp, ios. I got that problem is fb is overriding - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url and - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url methods. I can add my checks and open browser, but this solution seems like a hack. And ideally I want to open group page inside native app, if possible – Rustam Ganeyev Jan 31 '14 at 20:57

2 Answers2

1

Sorry, launching the Facebook native app straight into a group on iOS is not supported at this time.

The correct URL to open Facebook in mobile safari would be http://www.facebook.com/groups/roadsmash in your case.

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
benp
  • 533
  • 2
  • 6
1

I didn't find any acceptable solution to open page(not group) in native application, but there's an easy solution to open in mobile browser: just create new url with url-shortener(like bit.ly) and open with Application.OpenURL - it will be opened in browser.

Rustam Ganeyev
  • 894
  • 2
  • 12
  • 29