【发布时间】:2012-09-30 23:39:42
【问题描述】:
我正在开发一个 ipad 应用程序,我需要包含类似按钮的 facebook 页面。我已经在webview 中使用 iframe 加载了按钮,当用户单击按钮时,如果他们已经叹了气,计数应该增加或减少,否则弹出窗口会要求他们先登录。一旦他们登录,就会自动增加计数。
任何代码示例一步一步做。
这是我的webviewlike 按钮代码
NSString *likeButtonIframe = @"<iframe src='http://www.facebook.com/plugins/likebox.php?id=XXXXXXXXXXXXXXX&width=292&connections=0&stream=false&header=false&height=62' scrolling='no' frameborder=0' style='border:none; overflow:hidden; width:282px; height:62px;' allowTransparency='true'></iframe>";
NSString *likeButtonHtml = [NSString stringWithFormat:@"<HTML><BODY>%@</BODY></HTML>", likeButtonIframe];
[_webView loadHTMLString:likeButtonHtml baseURL:[NSURL URLWithString:@""]];
我也尝试过之前的节目,比如我会先让他登录,然后显示点赞按钮并让他们点赞。
【问题讨论】:
-
simple 需要在我的 ipad 应用程序中有类似按钮的 facebook 页面。一旦用户点击它要求他登录喜欢
标签: ios facebook facebook-like