dimanche 1 mars 2015

How to create an FBOpenGraphAction in Swift?

With objective-c an FBOpenGraphAction is created like:



id<FBOpenGraphAction> action = (id<FBOpenGraphAction>)[FBGraphObject graphObject];


What is the equivalent in Swift?


I would have assumed it is something like this:



let action = FBGraphObject.graphObject() as FBOpenGraphAction


But this causes a signal at runtime.


See also FBOpenGraphAction runtime error in Swift


Any ideas are very appreciated.


Aucun commentaire:

Enregistrer un commentaire