我正在使用以下代码。它带我进入我授权应用程序的 FB 对话框,在授权应用程序后它带我回到我的应用程序。但是它从不在墙上张贴任何东西。
有什么想法有什么问题吗?
- (void) login
{
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.facebook = [[Facebook alloc] initWithAppId:@"MY_APP_ID" andDelegate:self];
NSArray* permissions = [NSArray arrayWithObjects:@"publish_stream", nil];
[appDelegate.facebook authorize:permissions];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@".", @"name",
@".", @"caption",
nil];
/*
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@".", @"name",
@"Build great social apps and get more installs.", @"caption",
@"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps.", @"description",
@"https://developers.facebook.com/ios", @"link",
@"https://raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png", @"picture",
nil];
*/
// Invoke the dialog
[appDelegate.facebook dialog:@"feed" andParams:params andDelegate:self];
}