iOS9 / Xcode7์์ Facebook๋ฑ ๋ค๋ฅธ app์ URL Scheme ํธ์ถ ์คํจ
iOS์ social / account framework์ ์ด์ฉํ ํ์ด์ค๋ถ ๋ก๊ทธ์ธ ๊ตฌํ์ ๋ค์๊ณผ ๊ฐ์ ์ํฉ์ด ๋ฐ์ํ์๋ค.
fb://
๋ก ์์ํ๋ url์ ์ ์ ๊ฐ๋ฅํ์ง ์ฌ๋ถ, ์ฆ Facebook app์ด ์ค์น๋์๋์ง ํ์ธํ๋ ค๊ณ ๋ค์์ ์ฝ๋๋ฅผ ํธ์ถํ์๋ค.
-(BOOL) functionName {
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://]]) {
NSString *urlString = request.URL.absoluteString;
if ([@https://m.facebook.com/plugins/login_success.php" isEqualToString:urlString]) {
[self accountStore];
return NO;
}
return YES:
}
return YES;
}
ํ์ง๋ง ์๋์ ๊ฐ์ ์ค๋ฅ ๋ฉ์ธ์ง๋ฅผ ์ค๊ธฐ์ฐจ๊ฒ ๋ฑ์ด๋๋ค.
2015-08-24 21:57:23.219 meerkat[277:20308] -canOpenURL: failed for URL: “fb://” โ error: “This app is not allowed to query for scheme fb”