-2
我想发布在页面墙上的影像,我知道如何张贴在专辑中的图像,以及用户反馈,但对于页面的给予一定的问题上传照片至Facebook页面
我使用FBGraph API并希望将照片上传到Facebook页面,可以通过提供指向任何教程或任何代码库的链接指导我。
目前我发布的所有图片都显示在我的墙上,而不是我要发布的页面。
我用用上面的代码的成功发布文字页面墙上,但不是像下面的代码
-(void)postPictureToWall { NSMutableDictionary *variables = [[NSMutableDictionary alloc] init]; //create a FbGraphFile object insance and set the picture we wish to publish on it UIImage *frontImageNew=self.imgvgalleryImage.image; FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:frontImageNew]; //finally, set the FbGraphFileobject onto our variables dictionary.... [variables setObject:graph_file forKey:@"file"]; NSDateFormatter *df = [[NSDateFormatter alloc]init]; [df setDateStyle:NSDateFormatterMediumStyle]; [df setTimeStyle:NSDateFormatterMediumStyle]; NSString *bodyString=[NSString stringWithFormat:@"%@",[df stringFromDate:[NSDate date]]]; [variables setObject:bodyString forKey:@"message"]; FbGraphResponse *fb_graph_response = [objFBGraph doGraphPost:@"pageid_here/feed" withPostVars:variables]; SBJSON *parser = [[SBJSON alloc] init]; NSDictionary *facebook_response = [parser objectWithString:fb_graph_response.htmlResponse error:nil]; NSLog(@"fb response = %@",facebook_response); }
上午
我使用确切的代码只有一个区别,我使用'facebook_PAGE_ID'在me'的'的地方。但似乎无论它只发布在“我”上。你知道任何这样的限制或facebook的API行为不当吗? – thesummersign