Current status of the Ning Platform is always available on the Ning Status Blog.

NC for Hire

Perhaps you are trying to give members a way to (facebook) like several different pages on your site all from the same page. 

Or to put it another way....Often, people want to put more than one Like and Share buttons on the same web page. For example, one to like the domain name of the website (e.g. www.example.com) and another to like the particular article (e.g. www.example.com/my-article). Moreover, sometime you might want to show a like button opposite every item in a list of articles!

Let’s see how it is done.

Use Only One Div with ID “fb-root”

Many people simply copy the code provided by Facebook and paste it in their webpage. For the next button they will create another instance of the code from Facebook and paste it again in their web page. This creates multiple instances on fb-root div in your code. 

 

Step One: Go to Facebook Developers page for creating a like button

Plug one of the links in and style your buttons, then click get code > choose the app ID (usually same one you have connected to your community)

Grab the first portion of code which looks like this and place it inside your Custom Code TOP for N3.0:

<div id="fb-root"></div>
2<script>(function(d, s, id) {
3  var js, fjs = d.getElementsByTagName(s)[0];
4  if (d.getElementById(id)) return;
5  js = d.createElement(s); js.id = id;
6  js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=xxxYOURAPPIDxxx&version=v2.0";
7  fjs.parentNode.insertBefore(js, fjs);
8}(document, 'script', 'facebook-jssdk'));</script>

 

Step Two:  Create Multiple Like buttons all pointing to different URLS

When you add a Facebook Like button on a webpage, you need to understand that every such button likes a unique URL. That is to say that every FB Like button must be associated with a unique URL.

Use the following code to add as many Like buttons as you want. Just keep pasting this code wherever you need the Like button:

<div class=”fb-like” data-href=”UNIQUE-URL” data-layout=”standard” data-action=”like” data-show-faces=”true” data-share=”true”></div>

You can have multiple buttons if you repeat the above DIV tag.

Just don’t forget to change the data-href value as required.

If you’ll paste this DIV multiple times but will not change the data-href value, you will still see multiple FB Like buttons but they all will show same number of likes because they all will be associated with one URL.

If you follow these steps and change data-href value appropriately, all your Like buttons should be working fine now!

This is how multiple buttons are placed on a Ning page.  Let me know if you run into trouble....

Example of Multiple Facebook Like Buttons on the Same Page:

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

  • It's a nice idea. But will people know what url to put?

    • NC for Hire

      why wouldn't they?  its thier URLs

      • That's true. I was thinking for each individual page the native like buttons would be there. But for one specific page to like, the static not dynamic url would surve as a replacement.

  • Nice tip, Justin :-)

    Best wishes,

    Ning Team.

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted photos in Everyday Themes
16 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted a discussion in Everyday Themes
Specify what themes you are looking for and get themes for free.Let us help you find a graphic or…
17 hours ago
Rosas † Negras posted a discussion
 textarea.input-full { border: 2px groove #FFF;padding:border: 0px solid rgba(100, 100, 100, 1);…
yesterday
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ replied to ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion
Need help with CSS and HTML / CSS Code for layout
"I got my buttons coding going and changed on most layouts now. I like it when things glow lol "
yesterday
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ replied to ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion
Need help with CSS and HTML / CSS Code for layout
"I thought you may be an NC for Hire as well? My bad. You could probably be one tho if you wanted to…"
yesterday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"i added the perfect css thanks for making the remark"
yesterday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"status-container {border: 2px groove #eed255;padding: 10px;border-radius:…"
Monday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"I don't copy codes, the first person who created this is jen ,you have never had this css since I…"
Monday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"thank you my Master Bizz "
Monday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"⚡JFarrow⌁ 
we all miss you brother. creators in need of your codes,let's make this place alive…"
Monday
Rosas † Negras replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
".status-container {border: 2px groove #eed255;padding: 10px;border-radius:…"
Monday
⚡JFarrow⌁ replied to Rosas † Negras's discussion
Ning 3.0 - if you want to stylize your status-container these are CSS
"took the words out of my fingers..."
Monday
More…

Meanwhile, you can check our social media channels