Facebook sharing is not working
« on: May 10, 2017, 11:57:11 AM »
I  am trying to share my web content on facebook. Itis sharing but i can't preview my ad and it is saying "page not found". Infact im unable to share on any other social media like(G+, twitter,pinterest) Please help!!!!
« Last Edit: May 10, 2017, 12:42:01 PM by Swapna Das Karra »

*

Ivanko

  • *****
  • 388 posts

Re: Facebook sharing is not working
« Reply #2 on: May 10, 2017, 02:31:15 PM »

*

Ivanko

  • *****
  • 388 posts
Re: Facebook sharing is not working
« Reply #3 on: May 10, 2017, 03:26:55 PM »

*

MB Themes

Re: Facebook sharing is not working
« Reply #4 on: May 10, 2017, 04:23:08 PM »
@Swapna
You cannot share if you do not have Friendly URLs enabled. This lead to double ? in URL that is incorrect.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ivanko

  • *****
  • 388 posts
Re: Facebook sharing is not working
« Reply #5 on: May 10, 2017, 04:56:00 PM »
@frosticek
Oh, you are right! I wasn't think about friendly url :o

Then instead of:
Code: [Select]
<a class="single single-facebook" title="<?php echo osc_esc_html(__('Share on Facebook''veronika')); ?>" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo osc_item_url(); ?>"><i class="fa fa-facebook-square"></i></a>         
Use:
Code: [Select]
<a class="single single-facebook" title="<?php echo osc_esc_html(__('Share on Facebook''veronika')); ?>" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo rawurlencode(osc_item_url()); ?>&<?php echo osc_item_url(); ?>"><i class="fa fa-facebook-square"></i></a>
This should work with/without friendly URL (one more recommendation for next update) :)
         
« Last Edit: May 10, 2017, 09:21:03 PM by Ivanko »

Re: Facebook sharing is not working
« Reply #6 on: May 11, 2017, 07:39:43 AM »
@frosticek
Oh, you are right! I wasn't think about friendly url :o

Then instead of:
Code: [Select]
<a class="single single-facebook" title="<?php echo osc_esc_html(__('Share on Facebook''veronika')); ?>" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo osc_item_url(); ?>"><i class="fa fa-facebook-square"></i></a>         
Use:
Code: [Select]
<a class="single single-facebook" title="<?php echo osc_esc_html(__('Share on Facebook''veronika')); ?>" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo rawurlencode(osc_item_url()); ?>&<?php echo osc_item_url(); ?>"><i class="fa fa-facebook-square"></i></a>
This should work with/without friendly URL (one more recommendation for next update) :)
         

I replaced the code as u said, its working now. Thank you so much.

Re: Facebook sharing is not working
« Reply #7 on: May 11, 2017, 07:51:04 AM »
@Swapna
You cannot share if you do not have Friendly URLs enabled. This lead to double ? in URL that is incorrect.

Yes you are correct. i modified the code as @ Ivanko said,and its working fine. thank you