Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home Facebook Graph API Get Facebook Total Comments, Total Likes, Total Shares Of A Given URL

Get Facebook Total Comments, Total Likes, Total Shares Of A Given URL

This is a method uses to get Facebook information such as total comments, comment count, total likes, like count, total shares, share count, total count, click count, comment box count of one or more links (URLs) that are shared on Facebook or integrated with Facebook.

It’s useful when you want to store those information into database in order for users be able to sort or filter your entries by most Facebook comments, shares, likes, clicks, etc.

Get Facebook Total Comments, Total Likes, Total Shares

Simple run this URL on your browser, no permission required.

http://api.facebook.com/restserver.php?method=links.getStats&urls=_url_

http://api.facebook.com/restserver.php?method=links.getStats&urls=_url_

Let’s replace _url_ with your URL. For example, if you want to get share statistic of this url: http://4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/, you will need to run this:

http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2F4rapiddev.com%2Ffacebook-graph-api%2Fget-or-find-facebook-profile-id-number%2F

http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2F4rapiddev.com%2Ffacebook-graph-api%2Fget-or-find-facebook-profile-id-number%2F

Or click here to view the result.

Note: you will need to Encode the URL to ensure it works properly. Run the Online URL Encode Tool to encode your URL before trying.

Example of the result:

<links_getStats_response xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
<link_stat>
	<url>http://4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</url>
	<normalized_url>http://www.4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</normalized_url>
	<share_count>28</share_count>
	<like_count>14</like_count>
	<comment_count>1</comment_count>
	<total_count>43</total_count>
	<click_count>0</click_count>
	<comments_fbid>10150600093930621</comments_fbid>
	<commentsbox_count>0</commentsbox_count>
</link_stat>
</links_getStats_response>

<links_getStats_response xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"> <link_stat> <url>http://4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</url> <normalized_url>http://www.4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</normalized_url> <share_count>28</share_count> <like_count>14</like_count> <comment_count>1</comment_count> <total_count>43</total_count> <click_count>0</click_count> <comments_fbid>10150600093930621</comments_fbid> <commentsbox_count>0</commentsbox_count> </link_stat> </links_getStats_response>

Note: you can also get total comments, comment count, total likes, like count, total shares, share count, total count, click count, comment box count of the list of URL separated by comma (,).

For example:

http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2F4rapiddev.com%2Ffacebook-graph-api%2Fget-or-find-facebook-profile-id-number%2F,http%3A%2F%2F4rapiddev.com%2Fsql-server%2Fdelete-shrink-eliminate-transaction-log-ldf-file%2F

http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2F4rapiddev.com%2Ffacebook-graph-api%2Fget-or-find-facebook-profile-id-number%2F,http%3A%2F%2F4rapiddev.com%2Fsql-server%2Fdelete-shrink-eliminate-transaction-log-ldf-file%2F

Click here to get the result.

Example of the output:

<?xml version="1.0" encoding="UTF-8"?>
<links_getStats_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
  <link_stat>
    <url>http://4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</url>
    <normalized_url>http://www.4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</normalized_url>
    <share_count>28</share_count>
    <like_count>14</like_count>
    <comment_count>1</comment_count>
    <total_count>43</total_count>
    <click_count>0</click_count>
    <comments_fbid>10150600093930621</comments_fbid>
    <commentsbox_count>0</commentsbox_count>
  </link_stat>
  <link_stat>
    <url>http://4rapiddev.com/sql-server/delete-shrink-eliminate-transaction-log-ldf-file/</url>
    <normalized_url>http://www.4rapiddev.com/sql-server/delete-shrink-eliminate-transaction-log-ldf-file/</normalized_url>
    <share_count>2</share_count>
    <like_count>2</like_count>
    <comment_count>0</comment_count>
    <total_count>4</total_count>
    <click_count>0</click_count>
    <comments_fbid>10150211909918385</comments_fbid>
    <commentsbox_count>0</commentsbox_count>
  </link_stat>
</links_getStats_response>

<?xml version="1.0" encoding="UTF-8"?> <links_getStats_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"> <link_stat> <url>http://4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</url> <normalized_url>http://www.4rapiddev.com/facebook-graph-api/get-or-find-facebook-profile-id-number/</normalized_url> <share_count>28</share_count> <like_count>14</like_count> <comment_count>1</comment_count> <total_count>43</total_count> <click_count>0</click_count> <comments_fbid>10150600093930621</comments_fbid> <commentsbox_count>0</commentsbox_count> </link_stat> <link_stat> <url>http://4rapiddev.com/sql-server/delete-shrink-eliminate-transaction-log-ldf-file/</url> <normalized_url>http://www.4rapiddev.com/sql-server/delete-shrink-eliminate-transaction-log-ldf-file/</normalized_url> <share_count>2</share_count> <like_count>2</like_count> <comment_count>0</comment_count> <total_count>4</total_count> <click_count>0</click_count> <comments_fbid>10150211909918385</comments_fbid> <commentsbox_count>0</commentsbox_count> </link_stat> </links_getStats_response>

Feb 20, 2012Hoan Huynh
SQL Server get first/last day of previous/current/next monthASP.NET Get Facebook URL Total Comments, Total Likes, Total Shares
You Might Also Like:
  • PHP Get Facebook URL Total Comments, Total Likes, Total Shares
  • ASP.NET Get Facebook URL Total Comments, Total Likes, Total Shares
  • PHP Get Likes Number Of Facebook Page
  • Get or Find Facebook Profile Id Number
  • Get Or Find Facebook Fan Page Id Number
  • Facebook Load User Profile Via Graph API And FQL Query
  • Load And Save Facebook Profile Picture Of User
  • Get WordPress Most Popular Posts By Total Comments
  • Facebook Like Button And Recommend Button With fb:like, iframe and html5
  • Show Latest People Of Facebook Fan Page
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

9 years ago Facebook Graph APIFacebook, links.getStats, restserver1,053
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
22,517 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
20,302 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
16,054 views
JQuery Allow only numeric characters or only alphabet characters in textbox
13,532 views
C# Read Json From URL And Parse/Deserialize Json
10,076 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Paper Writing Service – Matters to Consider
  • Youwin canlı casino mobil giriş 2021
  • How to Pick Inexpensive Essay Writing Services
  • Obtenir un bonus de dépôt à partir d’un dépôt de casino
  • The Very Finest Payday Loans Online – How to Get Them
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (27)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (276)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development