Swift中的FBOpenGraphAction运行时错误

时间:2014-07-31 09:49:29

标签: facebook-opengraph facebook-ios-sdk

我正在尝试在iOS应用中创建Facebook自定义故事。我正在开发Swift应用程序。

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时做错了什么?任何帮助,将不胜感激。

由于

0 个答案:

没有答案