我在iPhone应用程序中在墙上实现Facebook发布时遇到问题.我安装SDK和链接框架登录工作正常.这是代码:
-(IBAction)loginButtonPressed:(id)sender
{
NSLog(@"loginButtonPressed: called");
AppDelegate *appdel=[[UIApplication sharedApplication] delegate];
appdel.facebookSession=[[FBSession alloc] init];
[appdel.facebookSession openWithCompletionHandler:^(FBSession *session,
FBSessionState status,
NSError *error)
{
//
}];
}
Run Code Online (Sandbox Code Playgroud)
但是我在用户的墙上发布消息时遇到了问题.这是代码:
-(IBAction)likeButtonPressed:(id)sender
{
NSLog(@"likeButtonPressed: called");
// Post a status update to the user's feedm via the Graph API, and display an alert view
// with the results or an error.
NSString *message = @"test message";
NSDictionary *params = [NSDictionary dictionaryWithObject:message forKey:@"message"];
// use the "startWith" helper static on FBRequest to both create and start a request, with …Run Code Online (Sandbox Code Playgroud)