在斯威夫特FBOpenGraphAction运行时错误(FBOpenGraphAction runt

2019-10-20 14:11发布

我想在我的iOS应用创建一个Facebook定制的故事。 我开发在斯威夫特的应用程序。

var graphObject: NSMutableDictionary = FBGraphObject.openGraphObjectForPostWithType(
    "app: type",
    title: "new", 
    image: nil,
    url: nil, 
    description: "description"
)

        (I am getting a runtime error on the following line)
        **var graphAction: FBOpenGraphAction = FBGraphObject.graphObject() as FBOpenGraphAction**


graphAction.setObject(UIImage(named: "default"), forKey: "image")
graphAction.setObject(graphObject, forKey: "break")

难道我做错了什么,同时宣布FBOpenGraphAction? 任何帮助,将不胜感激。

谢谢

文章来源: FBOpenGraphAction runtime error in Swift