[英]ios app URL scheme for facebook
我想通過FB共享我的應用程序URL。 可以說url方案設置為“ www.myapp.com”,在這種情況下,我的URL字符串應為“ www.myapp.com://?myParam=123”。
問題是,fb應用程序會在應用程序本身中打開此URL,然后將該URL更改為“ www.myapp.com/?myParam=123”。
對於尋找此功能的任何其他人,我使用UIActivityViewController並使用“ excludedActivityTypes”屬性從共享選項中消除了facebook和twitter。
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@
[[NSString stringWithFormat:@"iOS: %@",[NSURL URLWithString:[NSString stringWithFormat:@"www.abc.in://?shareid=%@", _stateManagerShared.shareID]]],
[NSString stringWithFormat:@"Android: %@",[NSURL URLWithString:[NSString stringWithFormat:@"www.abc.in/shareid=%@", _stateManagerShared.shareID]]]]
applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypePostToFacebook, UIActivityTypePostToTwitter];
[self presentViewController:activityVC animated:YES completion:nil];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.