相关疑难解决方法(0)

使用挂钩在Instagram上发布视频

我希望我的应用能够将视频上传到Instagram.

Instagram IPhone Hooks提供了如何使用iphone挂钩将照片上传到instagram的信息.我的问题是,是否有人有任何经验,如何完成相同但视频?

video objective-c ios instagram

38
推荐指数
5
解决办法
2万
查看次数

Instagram挂钩预选媒体问题

这是我的代码.该文件已正确添加到照片库,但在Instagram应用程序中此网址 - > instagram://library?AssetPath=assets-library%3A%2F%2Fasset%2Fasset.mp4%3Fid=5EDBD113-FF57-476B-AABB-6A59F31170B5&ext=mp4&InstagramCaption=my%caption不打开最后一个视频.

- (void)loadCameraRollAssetToInstagram:(NSURL*)assetsLibraryURL andMessage:(NSString*)message
{
    NSString *escapedString   = [self urlencodedString:assetsLibraryURL.absoluteString];
    NSString *escapedCaption  = [self urlencodedString:message];
    NSURL *instagramURL       = [NSURL URLWithString:[NSString stringWithFormat:@"instagram://library?AssetPath=%@&InstagramCaption=%@", escapedString, escapedCaption]];

    NSLog(@"instagramURL ==> %@",instagramURL);

    if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
        NSLog(@"Open Instagram!!");
        [[UIApplication sharedApplication] openURL:instagramURL];
    } else {
        NSLog(@"Cant open Instagram!!");
        [[[UIAlertView alloc] initWithTitle:@"Instagram" message:@"App not installed" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil] show];
    }
}

- (NSString*)urlencodedString:(NSString *)message
{
    return [message stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];
}

- (void)saveToCameraRoll:(NSURL *)srcURL withCurrentAction:(NSString *)action
{
    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; …
Run Code Online (Sandbox Code Playgroud)

hook objective-c ios instagram

12
推荐指数
1
解决办法
5059
查看次数

标签 统计

instagram ×2

ios ×2

objective-c ×2

hook ×1

video ×1