Den*_*ean 10 url text facebook ios messenger
有谁知道如何用预先填写的文本打开Facebook Messenger应用程序?
例如,要在指定用户处打开Messenger应用程序,您可以编写以下内容:
NSURL *fbURL = [NSURL URLWithString:@"fb-messenger://user-thread/USER_ID"];
if ([[UIApplication sharedApplication] canOpenURL: fbURL]) {
[[UIApplication sharedApplication] openURL: fbURL];
}
Run Code Online (Sandbox Code Playgroud)
对于Whats应用程序非常简单:
NSURL *whatsappURL = [NSURL URLWithString:[NSString stringWithFormat:@"whatsapp://send?text=%@", @"String to post here"]];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
}
Run Code Online (Sandbox Code Playgroud)
有这样的功能,但它只存在于Facebook的SDK中.
看看这个 - https://developers.facebook.com/docs/ios/share#message-dialog