【问题标题】:How to get the Instagram Media_ID of video In Ios.?如何在 iOS 中获取视频的 Instagram Media_ID?
【发布时间】:2017-01-02 10:15:07
【问题描述】:

我正在查找已上传的 Instagram 视频的 MediaID。它应该看起来像 1234567894561231236_33215652

我使用instagram 文档@" https://www.instagram.com/developer/embedding/ 但这是手动完成的..?

我希望以编程方式使用 Instagram API 或任何其他方式..?

请帮帮我?

【问题讨论】:

    标签: ios objective-c iphone instagram instagram-api


    【解决方案1】:

    您可以使用此 API:

    https://api.instagram.com/v1/media/shortcode/{short-code}?access_token=ACCESS-TOKEN
    

    https://www.instagram.com/developer/endpoints/media/#get_media_by_shortcode

    {short-code} 是 Instagram URL 中的代码:例如 BOn2hFYjz5a in https://www.instagram.com/p/BOn2hFYjz5a/

    【讨论】:

    • 感谢您的回答,但是如何在他们提供的文档 (instagram.com/developer/endpoints/media/#get_media_by_shortcode) 中创建那个 {short-code} URL,但这是一个手动过程吗?
    • 使用用户媒体端点从用户那里获取媒体列表并获取ID
    • 我正在通过我的 videoMakerApp 在 Insta 上分享视频,我想获取视频 ID 以获取点赞数。如果我获取媒体列表,那么如何将我需要的特定视频 ID 列入候选名单..
    • 你如何使用 instagram 视频 url 分享视频?显示示例
    • [self loadCameraRollAssetToInstagram:@"My_Video_Url_Here" andMessage:@"via BSHN"] //Delegate Method NSString *escString = [assetsLibraryURL.absoluteString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]] NSString *eCaption = [message stringByAddingPercent :[NSCharacterSet URLHostAllowedCharacterSet]] NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"instagram://library?AssetPath=%@&InstagramCaption=%@", eCaption]] [[UIApplication sharedApplication] openURL:instagramURL] /Share在应用上
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-08
    相关资源
    最近更新 更多