相关疑难解决方法(0)

Facebook sdk发布在iPhone应用程序的墙上

我在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)

iphone facebook objective-c ios

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

facebook ×1

ios ×1

iphone ×1

objective-c ×1