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

  • Home
  • SEARCH
  • 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 8285973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:35:48+00:00 2026-06-08T11:35:48+00:00

In HTML file I have used Facebook Social comment plugin and it is working

  • 0

In HTML file I have used Facebook Social comment plugin and it is working perfect,
but when I tried display same file in android using webview then it is displaying only comments not the comment box and it is showing a button “Login to facebook to Post a comment”. When I tried to Login by clicking on that button instead of showing comment box; the page is being redirected to facebook profile.Please help…

Here is the code:

HTML Code:

 <head>
 <meta content='website' property='og:type'/>
 <meta content='http://graph.facebook.com/username' property='fb:admins'/>
 <meta content='http://example.com/test.html' property='og:site_name'/>
 <meta content='415944175093180' property='fb:app_id'/>
 <meta content='Browser Detect' property='og:title'/>
 <meta content='Tells about Early days' property='og:description'/>
 <meta content='http://example.com/test.html' property='og:url'/>
 <meta content='http://example.com/test.html' property='og:image'/>
 </head>
 <body>
 <div id="fb-root"></div>
 <script>
 window.fbAsyncInit = function() {
    FB.init({
    appId: '415944175093180', status: true, cookie: true, xfbml: true,oauth: true}); };
    (function() {
    var e = document.createElement('script');
    e.type = 'text/javascript';
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());

  (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> 
  <fb:comments href="http://example.com/test.html" num_posts="20" width="470" />    
  </body>

Android code:

public class SimpleActivity extends Activity {

WebView web1;

ViewPager awesomePager;
    Context cxt;
    List<WebView> data;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.main);
    cxt = this;
    data = new ArrayList<WebView>();

    awesomePager = (ViewPager) findViewById(R.id.viewPager);
    awesomePager.setOffscreenPageLimit(10);

    WebView web1 = new WebView(cxt);
    web1.loadUrl("http://example.com/test.html");
            WebSettings webSettings1 = web1.getSettings();

            webSettings1.setJavaScriptEnabled(true);

    data.add(web1);
            awesomePager.setAdapter(new AwesomePagerAdapter(this,data));

}

  • 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-08T11:35:50+00:00Added an answer on June 8, 2026 at 11:35 am

    It may be that in “standard” html, using a web-browser, the session is somewhat saved so that you’re logged-in to facebook and you can leave comments as a logged users, even if you close your browser and fire it up again (cookies, “keep me logged, etc).

    Android browser, on the other hand, may not cache/save the session, the app may have been killed, etc. So you’re less prone to have an “always-on” session.

    Of course facebook will recognize this and present you the login form, ’cause you can’t leave comments as an anonymous user.

    AFAIK a solution would be to use Facebook API instead of Javascript log-in, so that your app permanently gets authorized to access user data/ post comment as a logged user.

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

Sidebar

Related Questions

I have made a html file, but when I upload and test it, I
well i have used an html file like these in iframe <iframe src=sample.html></iframe> is
I have an HTML file template which is used for mailing purpose here in
I have the following code snippet from a HTML file: <div id=rwImages_hidden style=display:none;> <img
I have a simple webview used to load a file help3.html when a user
I have used xpaths to great effect with both HTML and XML before, but
I have a jar file which is used in html file as applet. I
I need to show a graph(piegraph and XYgraph) in HTML file. I have used
In an HTML file I have the following: <input type=... name=myInput1 /> In a
I have html-file. I have to replace all text between this: [%anytext%]. As 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.