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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:59:07+00:00 2026-06-05T19:59:07+00:00

I have the following Facebook iframe as part of the template: <iframe allowTransparency=’true’ expr:src=’&quot;http://www.facebook.com/plugins/like.php?href=&quot;

  • 0

I have the following Facebook iframe as part of the template:

<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=standard&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:576px; height:24px;'/>

The main feature is that it uses the Blogspot variable data:post.url as the link that the user can “Like”. Unfortunately recently blogspot decided to redirect people to their local blospot addresses, so if you open example.blogspot.com in the UK, you will be redirected to example.blogspot.co.uk, and you can’t see any likes of people from outside of the island.

The obvious fix is to make everyone like the main .com page, so I created a script to generate this iframe dynamically:

<script type="text/javascript">
document.write("<iframe allowTransparency='true' frameborder='0' scrolling='no' src='http://www.facebook.com/plugins/like.php?href=");
var thisUrl = "data:post.url";
var beginning = thisUrl.indexOf("blogspot")+9;
var end = thisUrl.indexOf("/", 15);
document.write(thisUrl.substring(0, beginning));
document.write("com");//change regional url to com
document.write(thisUrl.substring(end));
document.write("&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light' style='border:none; overflow:hidden; width:576px; height:24px;'></iframe>");
</script>

To make Blogspot accept it I had to html-ecape bits of it, but I can’t get the variable data:post.url substituted to a correct value – it stays literally what it is.

  • 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-06-05T19:59:09+00:00Added an answer on June 5, 2026 at 7:59 pm

    To show Blogger variables you need to use <data:blog.varName/>.

    So, in your case, instead of:

    var thisUrl = "data:post.url";
    

    You need to use:

    var thisUrl = "<data:post.url/>";
    

    UPD 1: if you want to use page url in head section, use <data:blog.url/> not <data:post.url/>.

    UPD 2: but why you don’t use window.location?

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

Sidebar

Related Questions

I have the following code to show <iframe src=http://www.facebook.com/plugins/like.php?href=[mySite] scrolling=no frameborder=0 style=border:none; width:170px; height:80px></iframe>
Facebook used to have the following URL format to compose a message: http://www.facebook.com/?compose&id=XXXXXX&message=... However,
I have the following page I want to show in facebook app: http://www.facebook.com/mypage I
Following a server move last week I have found that all the Facebook iframe
I have the following iframe control (intended to be a facebook like button): <iframe
I have this Facebook application profile page: http://www.facebook.com/developers/editapp.php?app_id=122313254494566#!/apps/application.php?id=122313254494566 which is associated with my iframe-based
We currently have an iframe-based Facebook canvas application in the works. The canvas portion
All, I have the following code: <?php require_once 'facebook.php'; $app_id = 1234; $app_secret =
We have a strange issue with running an Facebook IFrame application (using MVC 2).
I have a facebook page with an iframe app. I want it to be

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.