Answer the question
In order to leave comments, you need to log in
Why can't Facebook display the map when sharing opengraph ios?
Actually I'm trying to share a post using a map via facebook.
in the application settings I did the following
In the object type I created an additional field for geolocation
In the actual object I create
var properties:NSDictionary = ["og:type": "myplanetnamespace:plan", "og:title": "Share on Facebook выа", "og:description": "In the frozen wastes to the north of Winterfell, sinister and supernatural forces are mustering.",
"myplanetnamespace:geoplace:latitude": String(stringInterpolationSegment: self.plan.venue!.location.latitude),
"myplanetnamespace:geoplace:longitude": String(stringInterpolationSegment: self.plan.venue!.location.longitude) ]
var object:FBSDKShareOpenGraphObject = FBSDKShareOpenGraphObject(properties: properties as [NSObject : AnyObject])
var action = FBSDKShareOpenGraphAction()
action.actionType = "myplanetnamespace:create_plan"
action.setObject(object, forKey: "plan")
var content:FBSDKShareOpenGraphContent = FBSDKShareOpenGraphContent()
content.action = action
content.previewPropertyName = "plan"
var shareDialog = FBSDKShareDialog()
shareDialog.fromViewController = self
shareDialog.shareContent = content
if ( shareDialog.canShow() == true ){
shareDialog.show()
}
var error:NSError?
if(!shareDialog.validateWithError(&error)){
print ("error")
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question