I\'m facing an issue on an UIWebView. I got a WebView which display an html string. This html string contains :
There's a solution to use the img
tag with base64 encoded image data instead of the url.
That should not be a problem as you have the image locally, see the html sample.
To test it quickly you can use the online encoding service (50kb limitation)
The original answer is here
And the truncated base64-sample for future reference:
<html>
<body>
<div id="fb-root"></div>
FB1
<script>
window.fbAsyncInit = function() {
FB.init({
appId : null,
channelUrl : null,
status : true,
cookie : true,
xfbml : true
});
};
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
FB2
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUh......lAmeQ/IAAAAASUVORK5CYII=" alt="Screen Shot 2012-05-23 at 6.53.28 AM.png" />
<div class="fb-comments" data-href="http://facebook.com" data-num-posts="2" data-width="470"></div>
</body>
</html>