[英]ios app URL scheme for facebook
I want to share my app URL via FB. 我想通过FB共享我的应用程序URL。 lets say the url scheme is set to "www.myapp.com", in that case my URL string would be "www.myapp.com://?myParam=123". 可以说url方案设置为“ www.myapp.com”,在这种情况下,我的URL字符串应为“ www.myapp.com://?myParam=123”。
Problem is, fb app opens this URL in the app itself and changes the URL to "www.myapp.com/?myParam=123". 问题是,fb应用程序会在应用程序本身中打开此URL,然后将该URL更改为“ www.myapp.com/?myParam=123”。
For any one else looking for this, I used UIActivityViewController and eliminated facebook and twitter from the sharing options, using "excludedActivityTypes" property. 对于寻找此功能的任何其他人,我使用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.