我正在使用此代码在Facebook页面上发布任何文本,并在代码中显示页面ID。它给出了成功的消息但是当我转到页面时什么也没有。 请帮忙......
提前致谢
-(void)facebookPost;
{ NSMutableDictionary * variables = [NSMutableDictionary dictionaryWithCapacity:2]; FbGraphFile * graph_file = [[FbGraphFile alloc] init]; // initWithImage:[UIImage imageNamed:@“gg”]]; //最后,将FbGraphFileobject设置为我们的变量字典.... [变量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];
}
答案 0 :(得分: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];
我已经解决了这个问题。