-2

我可以在朋友的 Facebook 墙上发布消息,但我想发布图片。我需要在我的代码中添加什么?

这是我当前的代码:

[[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:_graphPath params:
  [NSMutableDictionary dictionaryWithObject:@"Post on wall :)" forKey:@"message"]
andDelegate:self];
4

1 回答 1

0

一种解决方案是在用户的相册中发布一个标题。为此,您需要向字典中添加其他参数:

[[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:_graphPath params:
   [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Post on wall :)", @"message", image, @"source"] andDelegate:self];

imageUIImage您要发布的。

您还需要确保_graphpath指向用户相册的点:@"me/photos"

于 2012-07-18T21:25:00.443 回答