gpt4 book ai didi

ios - 在 Swift 中打开图表故事得到全白屏幕

转载 作者:行者123 更新时间:2023-11-30 13:15:14 25 4
gpt4 key购买 nike

我正在尝试将图表故事发布到 Facebook。我有一个应用程序,我的用户可以在其中跟踪不同轨道上的自行车骑行情况。然而,这段代码只是打开一个纯白色的 safari 页面,没有发生其他任何事情。

有人能看出我做错了什么吗?

   var properties : [NSObject : AnyObject] = [
"og:type": "fitness.course",
"og:title": "My title",
"og:description": "The ride you took",
"fitness:duration:value": self.rideModel.totalSeconds,
"fitness:duration:units": "s",
"fitness:distance:value": self.rideModel.totalDistance,
"fitness:distance:units": "m",
];

var i = 0;

let formatter = NSDateFormatter()
formatter.dateFormat = "yyyy'-'MM'-'dd'T'HH':'mm'"




for point in trackPointItems{


properties["fitness:metrics[\(i)]:location:latitude"] = point.latitude
properties["fitness:metrics[\(i)]:location:longitude"] = point.longitude
properties["fitness:metrics[\(i)]:location:altitude"] = point.altitude
properties["fitness:metrics[\(i)]:timestamp"] = formatter.stringFromDate(point.timeStamp)


i += 1;

}

let graphObject = FBSDKShareOpenGraphObject(properties: properties)

let action = FBSDKShareOpenGraphAction()
action.actionType = "fitness.course"
action.setObject(graphObject, forKey: "fitness.course")

let content = FBSDKShareOpenGraphContent()

content.action = action
content.previewPropertyName = "fitness.course"


FBSDKShareDialog.showFromViewController(self, withContent: content, delegate: self)

最佳答案

我发现我的积分太多了。我减少了数组中的点数 - 只取了每第二个点。然后就成功了。

关于ios - 在 Swift 中打开图表故事得到全白屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38301953/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com