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

  • Home
  • SEARCH
  • 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 7006917
In Process

The Archive Base Latest Questions

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

Is it possible to update database once a user shared a link in my

  • 0

Is it possible to update database once a user shared a link in my website?

Such as,some points will be awarded to their account if they shared the link.

And how can I ensure that they really share the link to facebook but not just click share then close the popup window…

I’m not familiar with facebook , and tried google it just now but still didn’t find the answer…

Thank you.

Edit:

   <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
    type="text/javascript">
   </script>

   <a name="fb_share" type="button" share_url="script2.php?id=XXX"> 
  • 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-27T21:32:22+00:00Added an answer on May 27, 2026 at 9:32 pm

    Update(Aug 21, 2013): Facebook’s api has changed since the time this was originally posted. The way to track likes is still the same (read original answer below), but the status of the share button has changed.

    The deprecation message/info. is no longer visible anywhere in the docs, but it can be seen in this bug. The share button still seems to be usable according to this doc. But there is no direct way from facebook to track a share. I’m not aware of any hacks to track shares either.


    Original answer:

    From Facebook docs at this link.

    The Share button has been deprecated in favor of the Like button, and will no longer be supported.
    Please use the Like button whenever possible to drive maximum traffic to your apps.

    So I’ll tell you how to do it for a like button:

    First use the Javascript sdk

    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId      : 'YOUR_APP_ID', // App ID
          channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
        });
    
        // Additional initialization code here
        // you can subscribe to events here
        // edge.create event is fired only when the user likes (which means that the wall post has already happened, when the like button was clicked) 
        FB.Event.subscribe('edge.create',
       function(response) {
        alert('You liked the URL: ' + response);
                // you can do some ajax call to your backend and update your database
       }
    ); 
      };
    
      // Load the SDK Asynchronously
      (function(d){
         var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         d.getElementsByTagName('head')[0].appendChild(js);
       }(document));
      </script>
    

    Somewhere in your page include the like button

    <fb:like href="http://example.com/fblike/" 
         send="true" width="450" show_faces="false"
         >
    </fb:like>
    

    You can also change the word that is displayed in the like button, from like to recommend, you should try and auto-generate your like button code from this link.

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

Sidebar

Related Questions

Is it possible to update a different ODBC database from withing a SQL Server
Is it possible to update all MySQL database tables, so that all data are
Is it possible to update IIS on Windows XP from 5.1 to 6? If
Is it possible to update more than one local variable in a single select?
Is it possible to update the same view with new data? Using UPDATE after
Is it possible to update a directory to a specific revision without cloning the
Is It Possible to update any trigger in Information schema?
If I try to implement this simple-as-possible example: Update Content with AJAXRefreshRequest it does
Is it possible to bulk update? I did a build insert, now I would
Alternatively is it possible to manually update the built in progress bar? Basically I

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.