Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableDictionary<FBOpenGraphObject> *object = [FBGraphObject openGraphObjectForPost];
- var object = FBGraphObject.openGraphActionForPost()
- // specify that this Open Graph object will be posted to Facebook
- object.setObject(true, forKey: "provisionedForPost")
- // for og:title
- object.setObject(description["title"]!, forKey: "title")
- // for og:type, this corresponds to the Namespace you've set for your app and the object type name
- object.setObject("bppridereport:ride", forKey: "type")
- // for og:description
- object.setObject(description["description"]!, forKey: "description")
- FBRequestConnection.startForPostOpenGraphObject(object, completionHandler: { (connection:FBRequestConnection!, result:AnyObject!, error:NSError!) -> Void in
- if error == nil {
- let objectId = result["id"]
- } else {
- NSLog("Error posting the Open Graph object to the Object API:", error);
- }
- })
- var object = FBGraphObject.openGraphActionForPost() as FBOpenGraphObject
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement