Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:29:51+00:00 2026-06-02T20:29:51+00:00

Recently I have been trying to integrate Facebook Social Plugins into a custom UIWebView

  • 0

Recently I have been trying to integrate Facebook Social Plugins into a custom UIWebView in iOS for commenting a webpage. I have added the Like Button as well as the Comments plugin. Here is the HTML code I load into the web view:

  <html>
    <body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.heretheweb.com" data-send="false" data-layout="button_count" data-width="240" data-show-faces="false"></div>
<div class="fb-comments" data-href="http://www.heretheweb.com" data-num-posts="5" data-width="470"></div>
<body>
</html>

The first implementation on Monday was sucessfull in 4 platforms, both simulators (iOS 4 and iOS 5), iPhone 3G iOS4 and iPhone 4 iOS 5.
On Tuesday, I kept developing this and I ended up with my custom UIWebView working with no problems in the first three. But on iPhone 4 (iOS 5) the web view kept reloading the same web page over and over again, resulting in the comment box never appearing. That URL is this:

https://m.facebook.com/plugins/comments.php?channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D4%23cb%3Df28c738848%26origin%3Dhttp%253A%252F%252Fwww.heretheweb.com%252Ff3fdf142e8%26domain%3Dwww.heretheweb.com%26relation%3Dparent.parent&href=http%3A%2F%2Fwww.heretheweb.com&locale=en_US&mobile=true&numposts=5&sdk=joey&width=470

I don’t know what I am doing wrong really, I have cleaned the uiWebView delegate methods, I have check with breakpoints ALL the methods I could override. Nothing… The webpage gets loaded at the beginning, and then it loops trying to load the above URL…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:29:52+00:00Added an answer on June 2, 2026 at 8:29 pm

    Ok… solved.
    For some strange and weird reason, sometimes when loading the comments web part ONLY in iPhone 4 (not simulator, iPhone 3G or iPad 2) it tries to reload once and once again (the Cache-Control header is set to max-age=0, so it keeps forcing the reload)

    The solution was to check the UIWebViewNavigationType, if it’s equal to UIWebViewNavigationTypeReload, shouldStartLoadWithRequest: returns NO.

    It was REALLY tricky ¬¬

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So recently I have been trying to set up a Vim-based iOS workflow. I
Recently I have been trying to delve into advanced (well for me) programming concepts
I have been recently trying to deploy a C# application on a computer that
I've recently been trying to port a C++ application. I believe I have all
I have been recently digging into Mobile Programming, I practically tried out the J2ME
So I recently have been trying to incorporate more sub forms to make the
Recently I have been trying to make changes so I can do builds through
I have been trying for a while to be able to access my recently
recently I have been trying my hand at coding a game in C#. I'm
I'm a vim user and have recently been trying out emacs for fun. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.