4
我在尝试在FB页上发布图片时遇到问题我是管理员。图片上传到我自己的帐户,而不是我的网页。iOS Facebook SDK在页面上发布图片,我拥有管理权
下面是我用来做这个代码:
- (void)apiGraphUserPhotosPost:(UIImage*)img withMessage:(NSString*)message {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSUInteger c;
for (c = 0; c < [gFBPageArray count]; c++)
{
if ([[[gFBPageArray objectAtIndex:c] objectForKey:@"name"] isEqualToString:[defaults objectForKey:@"FBPostAs"]])
break;
}
params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
img, @"picture", message, @"message", [[gFBPageArray objectAtIndex:c] objectForKey:@"access_token"], @"access_token",nil];
[[self facebook] requestWithGraphPath:[NSString stringWithFormat:@"/%@/photos", [[gFBPageArray objectAtIndex:c] objectForKey:@"id"]]
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
}
[defaults objectForKey:@"FBPostAs"]
包含在这里我要上传的图片的FB页面的名称。
gFBPageArray包含我拥有管理权限的FB页面的列表。
我做错了什么?
我已经做了的/ PAGEID /饲料和/ PAGEID /视频和它的工作原理以及类似的东西...
[你是否试过这个?](http://stackoverflow.com/questions/9374117/picture-post-to-facebook-ends-up-in-the-wrong-place?rq=1) – 2013-04-15 12:45:20
它的工作原理非常感谢,添加一个答案,所以我可以给你赏金奖励:) – Jeremy 2013-04-15 13:12:27