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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:00:09+00:00 2026-05-26T14:00:09+00:00

I just discovered that the iframe version of the Facebook Like button doesn’t honor

  • 0

I just discovered that the iframe version of the Facebook Like button doesn’t honor its query parameters when the iframe is created with JavaScript, rather than included directly in the document’s HTML.

Please have a look at this jsFiddle that I created:

http://jsfiddle.net/qQsCC/

I generated a Like button at the URL linked above and first included the HTML exactly as it was provided. Then, I broke it down into the JavaScript code needed to create and append an identical element to the DOM.

In the “Result” window, you’ll see the HTML version of the button on top, and the JavaScript-created version below. While the value of the src attribute is identical for both (as well as all other HTML attributes), the lower button doesn’t appear to honor any of the parameters that I’ve passed, such as colorscheme or font.

Does anyone know why this is happening, or have any suggestions for how I might avoid this behavior?

The use case here is that I’m creating HTML ads that will include the iframe version of the “Like” button; a requirement is that the ad can only load 50KB of data initially, then up to 1MB after window.onload has fired. Since the “Like” button weighs in over 50KB alone, I need to construct the iframe using JavaScript after window.onload rather than just including the <iframe> element in the ad’s HTML.

  • 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-26T14:00:10+00:00Added an answer on May 26, 2026 at 2:00 pm

    When you add url using HTML, html entities are automatically decoded. This doesn’t nappen in javascript. So you need to decode the url before passing it to javasript eg:

    like.src = 'http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2F&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=dark&font=arial&height=35';
    

    Hope this helps

    Updated JSfidle:
    http://jsfiddle.net/qQsCC/1/

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

Sidebar

Related Questions

I have a facebook iframe app, and I have just noticed that a basic
I just discovered that the Delphi TRibbonComboBox doesn't have an item index, and it
My son just discovered that he could hit my view's Done button, which flips
I just discovered that perl ignores space between the sigil and its variable name
I have just discovered that SQL Server CE doesn't allow you to batch queries.
To my amazement I just discovered that the C99 stdint.h is missing from MS
I've just discovered that Oracle lets you do the following: SELECT foo.a, (SELECT c
I have just discovered that if generating assemblies via Reflection.Emit, the .NET framework keeps
I've just discovered that regtlib.exe appears to be missing from Windows 7 (and apparently
I have a website, and I just discovered that somehow someone injected JavaScript on

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.