How to put FB Share button at Ads page

ClassiBase classifieds script Forums Tips and tricks How to put FB Share button at Ads page

Tagged: , ,

This topic contains 3 replies, has 2 voices, and was last updated by  ClassiBase 3 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3308 Reply

    Nordin Kadir
    Participant

    Hi,
    I want to insert facebook share button at every ads posting. Which when user click on it, the ads posting will be shared on the user’s fb wall.
    How to do this?

    #3317 Reply

    ClassiBase
    Keymaster

    You can add share button using Text widget. Related tutorial using Text widget explained here http://classibase.com/how-to-place-google-adsense-ads-on-classibase-classifieds-script/ (there used text widget for ads)
    You can use same instructions for any javascript code.

    Facebook share button you can get from their website or use Addthis if you want to share on multiple platforms.

    You can place share on FB code in “before content“, “after content” or “sidebar” widget area.
    If you want to show it only on ad pages then you can do so by checking all other checkboxes on Text widget in “Hide on following page types” field except “Ad page”.

    #3339 Reply

    Nordin Kadir
    Participant

    I had tried to share the page unfortunately it just able to share 1 static URL per button. The URL does not dynamically change to reflect current ads URL to be shared.
    How to make the share button carry the current URL to share?

    #3358 Reply

    ClassiBase
    Keymaster

    We tried FB share button from https://developers.facebook.com/docs/plugins/share-button?locale=en_US address

    <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.8&appId=56543567379";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-share-button"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u&src=sdkpreparse">Share</a></div>

    it displayed share button and when clicked it showed current ad with image, title and description on Facebook popup window.

    So it works correctly using URL where button is displayed.

    If you share url where you want to display FB button maybe we can see why it is not working for you.

    Regards.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: How to put FB Share button at Ads page
Your information: