i want to put likes button in my website, yet its running on LOCALHOST (IIS).
e.g FACEBOOK like button in showing likes , google+ button etc.
how ?

Dani AI

Generated

Quick practical notes for based on the replies (and thanks to and for the pointers): the social widgets themselves will usually load while you develop on IIS/localhost, but the things that commonly catch people out are share previews, like/share counts, and crawler access. Those items are tied to the page URL that the social network fetches (and that fetcher cannot see ), so you may see blank previews or zero counts until the network can reach the page or you tell the widget which public URL to use.

Checklist and minimal examples to make local testing behave more like production:

  • Explicitly set canonical and social metadata so crawlers have a consistent target.
  • For Facebook-like widgets, set the plugin target to the public URL you want counted.
  • If you need the crawler to scrape your current dev page, expose it (tunnel) or map a development hostname.

Example Open Graph meta tags:

<meta property="og:title" content="Page title" />
<meta property="og:description" content="One-line summary" />
<meta property="og:image" content="http://www.example.com/img.jpg" />
<meta property="og:url" content="http://www.example.com/that-page.html" />

Example explicit target for a Like plugin (XFBML/iframe versions accept a target URL):

<div class="fb-like" data-href="http://www.example.com/that-page.html" data-layout="button_count"></div>

Troubleshooting and cautions: use a tunneling tool (ngrok/localtunnel) or edit your hosts file and register that dev hostname in any app/domain settings if the network requires it. After changing meta tags, force a re-scrape with the provider’s debugging tool so previews/counts refresh. Watch for mixed-content errors (HTTPS pages blocking HTTP widgets) and for browser privacy extensions that hide third-party buttons. Remember counts are tied to the full URL (protocol + host + path) so numbers can change when you move from localhost to the live domain.

Recommended Answers

All 6 Replies

You can grab the api's from the the individual social networks.
or Click on these links:

Facebook [FaceBook Like Butt[on]

-or-

-or-

Share This Buttons

ok dear but is it runnable on LOCALHOST ? or need a live server ?

I can run mine with my localhost too.. As long as you have internet connection it should work.

Test it out to be sure.

: got you !!! won't happen again.

: thanks man !!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.