FaceBook喜欢我的应用程序页面

时间:2013-07-09 06:36:54

标签: ios facebook-sdk-3.0

我正在facebook页面上工作,就像没有像按钮这样的facebook。在我的申请中。

我正在使用以下代码来浏览我的应用程序中的页面。

以下是我想在Facebook上添加的页面网址。

NSString *likePage=@"https://www.facebook.com/pages/Shaktimantelecom/265306070277816?ref=hl"; // here you page url

以下是我的应用程序中的FaceBookRequestConnection课程。

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   likePage, @"object",[[NSUserDefaults standardUserDefaults] valueForKey:@"token"],@"access_token",
                                   nil];
[FBRequestConnection startWithGraphPath:@"/me/og.likes" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
        UIAlertView *alert=[[UIAlertView alloc] initWithTitle:nil message:[NSString stringWithFormat:@"liked with id %@",[result valueForKey:@"id"]] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
        [alert show];
        NSLog(@"result is %@",result);
    }];

当我使用上面的代码时,它会将错误视为"The operation couldn't be completed (com.facebook.sdk error 5)"

请帮忙告诉我是否做错了。

Note: I am using Facebook sdk.

0 个答案:

没有答案