简体   繁体   English

iOS中带有loadHTMLstring的Facebook评论

[英]Facebook Comments in iOS with loadHTMLstring

I have problem with Facebook Comments plugin. 我的Facebook评论插件有问题。 Is it event possible to embed it on UIWebView in iOS application? 是否有可能将其嵌入iOS应用程序的UIWebView中? I don't mean using loadUrl method ... but using loadHTMLstring ( I want it only localy on my application, without using any messy obj-c code if it's possible ). 我的意思不是使用loadUrl方法...而是使用loadHTMLstring(我只希望在应用程序中使用本地语言,如果可能的话,不要使用任何凌乱的obj-c代码)。 I'm using HTML5 code for it, but it's not working on simulator ... 我正在使用HTML5代码,但在模拟器上无法正常工作...

Am I doing anything wrong? 我做错什么了吗?

I've read similar topics, but haven't found any solution, that might help me. 我读过类似的主题,但是还没有找到任何解决方案,可能会对我有所帮助。

Thank's in advance for any help! 预先感谢您的任何帮助!

well, i found some workaround for this problem. 好吧,我找到了解决此问题的方法。 what i needed is to load local html page with comments plugin embedded. 我需要加载带有注释插件的本地html页面。 this html page is stored in resources of project. 该html页面存储在项目资源中。 so the code for me was something like that: 所以对我来说,代码是这样的:

    [reviewsView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"comments" withExtension:@"html"]]];

where reviewsView is a UIWebView element. 其中reviewsView是UIWebView元素。 however, it didn't work correctly in the end - comments had loaded, but facebook "loading progress bar" was still animating and for some reason login button was unclickable. 但是,它最终无法正常工作-已加载注释,但是Facebook“加载进度栏”仍在设置动画,并且由于某种原因无法单击登录按钮。 so i just returned to the idea with remote html comments page. 所以我只是回到了带有远程html注释页面的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM