Facebook问题

时间:2011-03-09 15:34:50

标签: iphone objective-c facebook

我正在使用facebook Graph API

如果

,请建议我做什么

我必须在应用程序墙上发布一个feed,并且在该feed中我必须上传带有文本的图像。

这是在我发布Feed时完成的,但是我无法使用我的iphone目标c代码。

这是附加代码:

NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:2];


UIImage *picture = [UIImage imageNamed:@"zoom_image_search_screenshots.png"];


FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:picture];


[variables setObject:graph_file forKey:@"file"];

[variables setObject:@"this is a test message: postPictureButtonPressed" forKey:@"message"];


//171256392921827 this is my application ID

FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"171256392921827/photos" withPostVars:variables];

使用此照片上传到我的墙上&创建默认相册

如果没有,请建议我是否可以通过手机提供任何文件。

由于

2 个答案:

答案 0 :(得分:0)

FbGraph sample app
从上面的链接下载iphone的fbgraph项目,代码被正确评论,你可以很容易地理解。希望这会有所帮助。

答案 1 :(得分:0)

Ankit以下代码可能会帮助您了解如何在Facebook的用户墙上发布图像 网址:http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app

我希望它有所帮助....