我已经在我的应用程序中实现了facebook,我在Facebook墙上成功上传了图像。 但有时如果任何用户从Facebook墙上删除图像(删除此帖子或删除带有应用名称的图像),那么它有时会隐藏Facebook墙上的图像。 如果我检查上传图像的应用程序代码,我会得到uploding图像的id。 但是仍然没有在Facebook的墙上显示图像。
如果有人遇到与Facebook Graph API类似的问题。
此外,某些帐户正在上传,但面临其他问题。
以下是我发布图片的代码片段
NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:3];
if(image != nil )
{
@try
{
FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:image];
[variables setObject:graph_file forKey:@"file"];
[variables setObject:feedText forKey:@"message"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"me/photos" withPostVars:variables];
NSLog(@"postPictureButtonandmessgaePressed: %@", fb_graph_response.htmlResponse);
NSString *tempMssg=NSLocalizedString(@"Image Successfully Post",@"Alert Facebook Success");
UIAlertView *alt=[[UIAlertView alloc]initWithTitle:@"Facebook" message:tempMssg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alt show];
[alt release];
}
@catch (NSException * e)
{
UIAlertView *alt=[[UIAlertView alloc]initWithTitle:@"Facebook" message:[e reason] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alt show];
[alt release];
return ;
}
}