lundi 2 mars 2015

Using geopoint with Facebook Open Graph story on iOS

I'm trying to post a map location on the user wall. Everything is working fine; the custom story is posted containing the map and the place mark with a label, but it's always located in the center bottom of the map (antartica - not good) It seems the lat/long values are not properly sent?


I feel like I tried all options settings up the location lat/long also referring to this question: How to define a "GeoPoint" property in Facebook SDK for iOS



NSMutableDictionary<FBOpenGraphObject> *object = [FBGraphObject openGraphObjectForPost];
object.provisionedForPost = YES;
object[@"title"] = @"Title"
object[@"type"] = @"appname:objecttypename";
object[@"description"] = @"desc";
object[@"place:location"] = @{@"latitude": @"45.06494", @"longitude": @"7.693421"};

id<FBOpenGraphAction> action = (id<FBOpenGraphAction>)[FBGraphObject graphObject];
[action setObject:object forKey:@"objecttypename"];

FBOpenGraphActionParams *params = [[FBOpenGraphActionParams alloc] init];
params.action = action;
params.actionType = @"appname:actionname";
params.previewPropertyName = @"objecttypename";

Aucun commentaire:

Enregistrer un commentaire