【问题标题】:Location does not show up on Map in the Instagram位置未显示在 Instagram 的地图上
【发布时间】:2017-06-27 05:12:32
【问题描述】:

当用户点击我的应用程序中的 Instagram 图标时,它会将他带到业务 instagram,但地图没有注释。

我想知道我错过了什么?

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>instagram</string>
    </array>


NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=438681044"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
    [[UIApplication sharedApplication] openURL:instagramURL];
}

【问题讨论】:

  • 你是否在 appdegates.m 文件中添加了一些代码行/
  • -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [self.instagram handleOpenURL:url]; }
  • 确保您的 id 正确后,请检查此blog.csdn.net/icetime17/article/details/48261403
  • locationid是正确的,因为它带来了相应的商业照片,但地图不显示。
  • 尝试使用静态 id 一次

标签: ios objective-c instagram


【解决方案1】:

它对我有用,并且位置 ID 是正确的。 也许您可以检查您是否在 Instagram 应用中禁用了某些权限,或者您的互联网连接有问题。最好从 clean state 开始,重新安装 instagram,然后再试一次。 无论如何它与Instagram地图无关。

Openurl 在 iOS 10 中已弃用:

 NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=438681044"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
    [[UIApplication sharedApplication] openURL:instagramURL options:@{} completionHandler:nil];
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多