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 6965701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:05:43+00:00 2026-05-27T16:05:43+00:00

Trying to demystify the Like button as of December 2011. http://developers.facebook.com/docs/reference/plugins/like/ Have 2 questions:

  • 0

Trying to demystify the Like button as of December 2011.

http://developers.facebook.com/docs/reference/plugins/like/

Have 2 questions:

  1. How do I include a “src” and “ref” paramater in the URL that the user is liking? I realize this is well documented, yet I couldn’t actually do it in my testing… please provide an example of this.
  2. How can I stuff the UID of user that is liking it onto the link that they are liking for example, if they like http://example.com, I’d like the link to be formed http://example.com?src=fb&ref=1234567

Please point me to any examples, thanks!

  • 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-27T16:05:44+00:00Added an answer on May 27, 2026 at 4:05 pm

    I am assuming that you have the user-id.
    You can specify the ref parameter as follows, (XFBML version)

    <fb:like href="http://example.com/fblikepage.php" 
         send="true" width="450" show_faces="true"
         ref="<?php echo $userid; ?>"
    >
    </fb:like>
    

    There is no way you can specify the src parameter, it’ll be automatically appended by Facebook, when you specify the ref parameter as shown above. The url will look like this on Facebook : http://www.example.com/fblikepage.php?fb_ref=xyz&fb_source=profile_oneline. See the following part from the documentation.

    ref – a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). The ref attribute causes two parameters to be added to the referrer URL when a user clicks a link from a stream story about a Like action:
    fb_ref – the ref parameter
    fb_source – the stream type (‘home’, ‘profile’, ‘search’, ‘other’) in which the click occurred and the story type (‘oneline’ or ‘multiline’), concatenated with an underscore.

    Ofcourse the fb_source parameter will vary according to where the url is shown on Facebook and that will be done by Facebook. If you want to know whether a user is visiting through Facebook or not, you can just see if the fb_source parameter is there in the $_REQUEST variable, something like this:

    <?php
     /* lots of code */
     if(isset($_REQUEST['fb_source'])){
       // we know the current user is visiting through some link on Facebook, so you can do whatever you wanted here
     }
    

    Hope this helps.

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

Sidebar

Related Questions

trying to solve a bug! I have an ajax powered social network (with like
Trying to get my css / C# functions to look like this: body {
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
Trying to honor a feature request from our customers, I'd like that my application,
trying to understand http and headers i was playing around with telnet to send
Trying to get a reference to the worksheets (using Excel interop): Excel.Application xl =
Trying to use the http://www.dinnermint.org/css/creating-triangles-in-css/ method to create an arrow _________________ \ \ \
Trying to learn HTML5 and downloaded a test project https://github.com/amiklosi/Comicr . There is a
Trying to construct a query such that I have multiple statement specifying joins, each
Trying to figure out how to convert how to covert 5 variables I have

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.