0

我正在使用此代码在 facebook 页面上发布任何文本,其中页面 id 已在代码中提及。它给出了成功消息,但是当我转到该页面时,什么也没有。请帮助...

提前致谢

-(void)facebookPost;

{ NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:2]; FbGraphFile *graph_file = [[FbGraphFile alloc]init]; //initWithImage:[UIImage imageNamed:@"gg"]]; //最后,将 FbGraphFile 对象设置到我们的变量字典中.... [variables setObject:graph_file forKey:@"file"];

[variables setObject:@"hihihi" forKey:@"message"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:[NSString stringWithFormat:@"%@/167884363345570/feed",FACEBOOK_APP_KEY] withPostVars:variables];

FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:[NSString stringWithFormat:@"%@/167884363345570/feed",FACEBOOK_APP_KEY] withPostVars:variables];

}
4

1 回答 1

0

错误出现在这一行...

错误的:

FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:[NSString stringWithFormat:@"%@/167884363345570/feed",FACEBOOK_APP_KEY] withPostVars:variables];

正确的方法是这样的:

FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:[NSString stringWithFormat:@"167884363345570/feed"] withPostVars:variables];

我已经解决了这个问题。

于 2012-10-21T09:06:39.357 回答