2012-10-19 129 views
0

我正在使用此代码在facebook页面上发布任何带有代码中提到的页面id的文本。它给成功的消息,但当我转到页面没有什么。 PLS帮助...在facebook页面发布

预先感谢

-(void)facebookPost; 

{ 的NSMutableDictionary *变量= [的NSMutableDictionary dictionaryWithCapacity:2]; FbGraphFile * graph_file = [[FbGraphFile alloc] init]; // initWithImage:[UIImage imageNamed:@“gg”]]; //最后,将FbGraphFileobject设置到我们的变量字典中。

[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 /进料”,FACEBOOK_APP_KEY] withPostVars:变量];

} 

回答

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]; 

,我已经解决了这个问题。