L
L
LLCUnitBean2015-09-04 11:23:46
Facebook
LLCUnitBean, 2015-09-04 11:23:46

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
8a30r.png
In the object type I created an additional field for geolocation
gs0PI.png
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])

Next I create an Action
var action = FBSDKShareOpenGraphAction()
    action.actionType = "myplanetnamespace:create_plan"
     action.setObject(object, forKey: "plan")

Own content
var content:FBSDKShareOpenGraphContent = FBSDKShareOpenGraphContent()
    content.action = action
    content.previewPropertyName = "plan"

Well, I'm starting to fumble
var shareDialog = FBSDKShareDialog()
        shareDialog.fromViewController = self
        shareDialog.shareContent = content
        if ( shareDialog.canShow() == true ){
            shareDialog.show()
        }
        var error:NSError?
        if(!shareDialog.validateWithError(&error)){
            print ("error")
        }

In the settings, I specifically made the field with the location mandatory so that in case of empty filling it would give an error. Actually now it does not give them out, but when sharing in the post, there is still no map with the location. If you shove a picture, then everything is fine.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
An, 2015-09-05
@Flanker_4

Unfortunately, I did not work with this api, so I don’t know how useful my advice will be.
Here stackoverflow.com/questions/19383645/using-faceboo... they say something similar discuss

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question