我想从我的原生iOS应用程序在SnapChat上分享图像。我曾尝试搜索集成过程,但无法找到任何方法,因此我可以在SnapChat中集成逻辑以便从我的应用程序共享图像。 请帮忙。如果可能,请分享任何一个例子吗?
答案 0 :(得分:0)
你试过..当你点击我们的应用程序中的非分享按钮时: 你可以传递图像或文字或数据
检查代码:
NSArray *objectsToShare = @[your text or image objects..];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
NSArray *excludeActivities = @[UIActivityTypeAirDrop,
UIActivityTypePrint,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo];
activityVC.excludedActivityTypes = excludeActivities;
[self presentViewController:activityVC animated:YES completion:nil];
在你内部你可以选择Snapchat或Facebook或WhatsApp ...所有共享启用的应用程序。
答案 1 :(得分:0)
试一试<#strong>
"Namespace Manager or XsIContext needed. The query has a prefix variable or user-defined function"
使用此条件使用iPod Share
NSString *urlstring = [NSString stringWithFormat:@"Your Share URL"];
NSURL *myurl = [NSURL URLWithString:urlstring];
NSArray *myarray = @[myurl];
NSLog(@"%@",myarray);
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:myarray applicationActivities:nil];
答案 2 :(得分:0)
请按照以下教程在 iOS Swift 中分享 Snapchat..
Snapchat Creative Kit iOS (Swift) - Image, Video, Sticker Sharing