在Facebook上执行操作,如在iPhone应用程序中的按钮

时间:2012-09-03 08:27:49

标签: iphone facebook-graph-api facebook-like

NSString *likeButtonIframe = @"<iframe src=\"http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FyoghurtstoryNZ&amp;send=true&amp;width=450&amp;height=480&amp;action=like&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=true&amp;header=true\" scrolling=\"yes\" frameborder=\"0\" style=\"border:none; overflow:visible; width:292px; height:590px;\" allowTransparency=\"true\"></iframe>";
NSString *likeButtonHtml = [NSString stringWithFormat:@"<HTML><BODY>%@</BODY></HTML>", likeButtonIframe];  
[webView loadHTMLString:likeButtonHtml baseURL:[NSURL URLWithString:@""]]; 

-(void)like  {    
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Note" message:@"You are the member of Yoghurt Story." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
    [alert show];
    [alert release];
}

这是我用来显示警告显示消息的代码。但是,警报窗口不会出现。行动可能不会被召唤。

提前致谢。

1 个答案:

答案 0 :(得分:-1)

最后我自己回答了我的问题。我从这个链接得到了很多帮助

http://wyldco.com/blog/2010/11/how-to-capture-touches-over-a-uiwebview/