0

Hi All,

I am trying to share articles to Facebook using Facebook share button. While i am trying to share the discription displays as "Hi You don't have an account please register an account by entering..." like message. It will happen only using to share the "http://www.crazyenews.com/" and related sub pages. But it works fine for "http://www.olx.com", "http://www.google.com", "http://www.sulekha.com" urls. Find the snap in attachement and

The code am using as follows

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

<div class="fb-share-button" data-href="http://www.crazyenews.com" data-layout="button_count"></div>

Please provide the solution.

Thanks in advance

Thanks,
Mahesh

Edited by Mahesh57: Attach Snap

Attachments fbissue3.png 12.2 KB
2
Contributors
6
Replies
28
Views
2 Years
Discussion Span
Last Post by Mahesh57
0

did you include the Javascript SDK right after the <body> tags?

for example,

<body>

    <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'Put__Your_Own_App_ID__Here',
      xfbml      : true,
      version    : 'v2.1'
    });
  };

  (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";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>

The APP ID you need to sign-up for it on facebook website.

0

I am tried through the facebook developer site itself there also same thing please find the attached screen shots. Whats the issue its only not working in my site url only..

Edited by Mahesh57

Attachments fb1.png 213.76 KB fb2.png 321.49 KB
0

Do you have a facebook developers account?

if so, have you created an application?

is the application set to public or development?

Here is a test app I just created 3 minutes ago and I followed the same instructions I have given you.

1612a2e13fcbfe8f6fd40840e6f3bce9

did you add the button like this?

<div class="fb-share-button" data-href="http://YourDOmainDotCom/whatever_page" data-layout="icon_link"></div>

Edited by veedeoo: more info added

0

try rewriting your javascript like this

from this

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
    <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&appId=224643507660473";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

to this

<script src="http://connect.facebook.net/en_US/all.js#xfbml=true">

(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&appId=224643507660473";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>

<div id="fb-root"></div>

I personally tested the script above using my own app ID and it work the same as my first recommended implementation above.

If still doesn't work out for you, you will have to post your isssues on facebook developer support.

0

Thanks for the reply. Did you checked with specified URL is it works?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.