Facebook comment plugin in Hybrid mobile app not showing
NickName:c.k Ask DateTime:2016-08-12T14:06:20

Facebook comment plugin in Hybrid mobile app not showing

I am using this plugin on my website. This will enable people to write their comment on fb comment box. This link will give you the comment plugin code: https://developers.facebook.com/docs/plugins/comments#configurator

Then I try adding it on my hybrid mobile app.

Here is an example code:

<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/sdk.js#xfbml=1&version=v2.7";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>



<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-numposts="5"></div>

At first I have an error here. I just changed this line: js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.7"; to js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.7";

The error disappeared but still the comment box doesn't show. They say it should not be run locally and you need to host your html file on a server.

If hybrid app don't have a host (just local file), how can I show the comment box?

Copyright Notice:Content Author:「c.k」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38911010/facebook-comment-plugin-in-hybrid-mobile-app-not-showing

More about “Facebook comment plugin in Hybrid mobile app not showing” related questions

Facebook comment plugin in Hybrid mobile app not showing

I am using this plugin on my website. This will enable people to write their comment on fb comment box. This link will give you the comment plugin code: https://developers.facebook.com/docs/plugins/

Show Detail

Mobile Hybrid application Facebook and Twitter plugin

Is there any Hybrid mobile app plugin for Facebook and Twitter. Please point me to realtime examples and detailed usage of the plugins in javascript. or Should this be handled from native app, but

Show Detail

Facebook Login on Both Web and Hybrid Mobile App

I'm using Ionic for hybrid mobile app dev on iOS and Android and also have a web application for use in desktop and mobile browsers. The apps all have Facebook Login capability but I'm finding tha...

Show Detail

Facebook comment plugin not working mobile app

I'm creating a mobile application with HTML5 and JS. I added the Facebook comment plugin to my application in order to give user the ability to comment. But it is not working when I create APK file...

Show Detail

Facebook Comment in local machine or Phone (Hybrid Apps)

I have read a lot of questions here about including the facebook comment on hybrid mobile app (cordova app). I have the same issue and I don't get any concrete answer or solution. I also tried cont...

Show Detail

Converting facebook pixel event to app event in hybrid mobile app

I am trying to send App Events from Hybrid mobile app(cordova). Through Facebook Pixel event can be sent but as stated by this blog - "Sending App Events in the context of a mobile application can

Show Detail

[error]Facebook Developer Account is not creating New App ID for Cordova Hybrid App

I am new to Hybrid App's and new to FB integration. I am trying to create new App ID in FB developer account, the below page is showing. After click on the create button also, the App ID is not cr...

Show Detail

How can I display facebook comment box in my ionic cordova hybrid app

I am using ionic cordova for my hybrid mobile app development. I have added below in my index.html &lt;body ng-app="starter"&gt; &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt;(fu

Show Detail

Comment plugin - mobile attribute?

On the developer page (http://developers.facebook.com/docs/reference/plugins/comments/) I can see that the facebook comment Social plugin has the following attributes. Attributes href - the URL fo...

Show Detail

how to implement facebook feed using ionic framework for hybrid app

I am working on a hybrid mobile app using ionic and cordova, In the app I am sharing pictures with comments in social media. I want to impliment "facebook feed" method to share pictures in facebook...

Show Detail