Iphone 我们如何使用FB登录来创建url?
我想使用给定链接中显示的like按钮来喜欢url 单击“喜欢”按钮将喜欢此页面,并显示在活动块下的facebook个人资料页面中,如下所示: 我们怎么会喜欢iPhone应用程序中的url呢?如果用户是用fb登录的,那么就像如果不登录,那么登录,然后像Iphone 我们如何使用FB登录来创建url?,iphone,facebook,facebook-like,Iphone,Facebook,Facebook Like,我想使用给定链接中显示的like按钮来喜欢url 单击“喜欢”按钮将喜欢此页面,并显示在活动块下的facebook个人资料页面中,如下所示: 我们怎么会喜欢iPhone应用程序中的url呢?如果用户是用fb登录的,那么就像如果不登录,那么登录,然后像 提前谢谢。你在找这个吗:你在找这个吗:最后,我完成了 使用graph API喜欢页面URL的代码如下: - (IBAction)likepageonFB:(id)sender { [appDelegate openSession
提前谢谢。你在找这个吗:你在找这个吗:最后,我完成了 使用graph API喜欢页面URL的代码如下:
- (IBAction)likepageonFB:(id)sender
{
[appDelegate openSession];
NSString *likePage=@"http://www.facebook.com/ipreencekmr";
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);
}];
}
你可以查看我上传的这个例子。最后,我完成了 使用graph API喜欢页面URL的代码如下:
- (IBAction)likepageonFB:(id)sender
{
[appDelegate openSession];
NSString *likePage=@"http://www.facebook.com/ipreencekmr";
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);
}];
}
你可以检查我上传的这个例子