Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4584176
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:19:05+00:00 2026-05-21T21:19:05+00:00

Ideally I would like to do this using javascript client side scripting only. If

  • 0

Ideally I would like to do this using javascript client side scripting only. If that is not possible then I’d like to do this in such a way as to have the server do the least amount of work.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:19:06+00:00Added an answer on May 21, 2026 at 9:19 pm

    Actually, https://graph.facebook.com/?ids=http://www.stackoverflow.com will return the number of SHARES for that url, which is distinct from the number of likes because it also includes comments and other forms of sharing. This may or may not be an important difference.

    With Graph API 2.1+ there are two methods…though both now require access tokens. See below on how to get an access token that lasts forever and is not related to a user session.

    Like count for URLs:

    1. First, you need to get the ID of the URL:
      https://graph.facebook.com/?id=http://www.stackoverflow.com
      (you do not need an access token for this)
    2. Once you have the id, you can get the like count via the likes endpoint. You can access the total count in the summary part of the json response. Here’s an example request: https://graph.facebook.com/10150180465825637/likes/?summary=true&access_token=TOKEN_GOES_HERE
      (you need a valid access token here, but you can use app access token – see below)

    Like count for Facebook Pages:

    1. You can get the like count directly via: https://graph.facebook.com/FacebookDevelopers/?fields=likes&access_token=TOKEN_GOES_HERE
      (you need a valid access token here, but you can use app access token – see below)

    How to get a perpetual Access Token (App Access Token):

    You can use a user access token to get these results, but often for like-count scripts that is not an option.

    You’ll need to use the App Access Token instead, which will allow you to run the script “offline” without an active user access token session. Previously you had to request an app access token, now it is as simple as concatenating the app id and secret with | as follows:

    MY_APP_ID|MY_APP_SECRET
    

    In otherwords, the full request from above would be something like:

    https://graph.facebook.com/10150180465825637/likes/?summary=true&access_token=MY_APP_ID|MY_APP_SECRET
    

    Keep in mind that since the app secret is required for this request you should always perform this request server-side. Client-side requests would expose your app secret to everyone.


    In previous versions of Graph API (2.0 and lower) you could use FQL:

    SELECT like_count FROM link_stat WHERE url=”http://www.stackoverflow.com”

    Here is the actual link. There about 200 likes and 2000+ shares as of this writing, so it’s a big difference…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get a list of the wireless networks available. Ideally this
I have two HTML tables which would ideally be placed side by side on
This obviously requires the source file to be under source control. I would ideally
Without using a WebBrowser control, how could I execute a JavaScript function, that is
Ideally I would like to monitor the signal strength of a wireless network in
I have one string, that looks like this: a[abcdefghi,2,3,jklmnopqr] The beginning a is fixed
Before everyone tells me that I shouldn't do client-side sanitization (I do in fact
I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would
Anyone know of a good free winforms html editor for .NET. Ideally I would
What is the best way to approximate a cubic Bezier curve? Ideally I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.