我正在使用以下代码在Facebook上发布图片
-(void) facebookShare: (id) sender
{
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *facebookSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
CCScene *myScene = [[CCDirector sharedDirector] runningScene];
CCNode *node = [myScene.children objectAtIndex:0];
[facebookSheet addImage: [GameOverLayer screenshotWithStartNode:node]];
[facebookSheet setInitialText:[NSString stringWithFormat:@"I just scored %d in an awesome game of XXX", scoreNum]];
[[CCDirector sharedDirector] presentViewController:facebookSheet animated:YES completion:nil];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Please login to Facebook to share your score!" delegate: self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Login",nil];
[alert show];
}
}
代码工作正常,但我想知道如何为游戏创建特定的专辑,并将图像发布到该专辑?谢谢!