Adding the Facebook Like Button in an iPhone App

前端 未结 11 974
忘掉有多难
忘掉有多难 2020-12-04 17:08

Does anyone know how I would include a facbeook \"like button\" in an iphone app. I tried calling the iframe inside of a UIWebView but that doesn\'t work.

11条回答
  •  独厮守ぢ
    2020-12-04 17:22

    First check your authentication on Facebook, then use url code instead of iFrame like this:

    NSURL *url = [NSURL URLWithString:@"http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FRemtechConfessionChambers&width=200&height=80&colorscheme=light&layout=standard&action=like&show_faces=true&send=false"];
    NSURLRequest *req = [NSURLRequest requestWithURL:url];
    
    [webViewFb loadRequest:req];
    

提交回复
热议问题