Iphone 如何使用FacebookOpenGraphAPI进行FacebookDK健身
我想在Facebook上发布一个开放图fitness:walk action,并希望它与我的路径地图一起呈现。我该怎么做?下面的方法发布了该动作,我可以在Facebook上的活动日志和时间线上看到该动作的文本。但是,当我浏览张贴的行动的任何元素时,我看不到地图。我做错了什么Iphone 如何使用FacebookOpenGraphAPI进行FacebookDK健身,iphone,ios,objective-c,facebook-opengraph,Iphone,Ios,Objective C,Facebook Opengraph,我想在Facebook上发布一个开放图fitness:walk action,并希望它与我的路径地图一起呈现。我该怎么做?下面的方法发布了该动作,我可以在Facebook上的活动日志和时间线上看到该动作的文本。但是,当我浏览张贴的行动的任何元素时,我看不到地图。我做错了什么 NSMutableDictionary<FBGraphObject> *action = [FBGraphObject graphObject];action[@"course"] = @"http://samp
NSMutableDictionary<FBGraphObject> *action = [FBGraphObject graphObject];action[@"course"] = @"http://samples.ogp.me/136756249803614";
[FBRequestConnection startForPostWithGraphPath:@"me/fitness.walks"
graphObject:action
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
// handle the result
NSLog(@"error:%@",error.description);
NSLog(@"Result:%@",result);
}];
NSMutableDictionary*action=[FBGraphObject-graphObject];行动[@“课程”]=@”http://samples.ogp.me/136756249803614";
[FBRequestConnection startForPostWithGraphPath:@“me/fitness.walks”
graphObject:动作
completionHandler:^(FBRequestConnection*连接,
身份证结果,
N错误*错误){
//处理结果
NSLog(@“错误:%@”,错误描述);
NSLog(@“结果:%@”,结果);
}];
试试这个
[FBRequestConnection startForPostWithGraphPath:[NSString stringWithFormat:@"me/fitness.%@?access_token=%@",walkType,appDelegate.session.accessTokenData.accessToken]
graphObject:action
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error)
{
// handle the result
//NSLog(@"error description:%@",error);
NSLog(@"Result:%@",result);
[SVProgressHUD dismiss];
if (error == nil)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Track My Walks" message:[NSString stringWithFormat:@"You successfully post a route and your id is:%@",[result valueForKey:@"id"]] delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alert show];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Track My Walks" message:error.description delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alert show];
}
}];
}];
[request setFailedBlock:^{
[SVProgressHUD dismiss];
NSError *error = [request error];
NSLog(@"Error: %@", error.localizedDescription);
[self directionsDidFailedDirections:error.localizedDescription];
}];
[request startAsynchronous];
使用相同的代码,但有其他问题。。。在我的时间线中显示后期绘制。@Xylian检查您的活动日志。它可能在那里。然后将其更改为显示在时间轴上