问题
I am trying to create a Facebook custom story in my iOS App. I am developing the app in 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")
Am i doing something wrong while declaring the FBOpenGraphAction? Any help would be appreciated.
Thanks
来源:https://stackoverflow.com/questions/25055801/fbopengraphaction-runtime-error-in-swift