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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:00:49+00:00 2026-05-31T01:00:49+00:00

On my website I am trying to create a Facebook thumbnail so that when

  • 0

On my website I am trying to create a Facebook thumbnail so that when I share a picture I want Facebook to select a specific picture. I have ONE number in each url of my site and according to that number I have an image that should display in that page. Any way I wrote the code below, but for a reason it is not working. I want to keep href empty then access it through document.getElementById('ShareImageID').href and change its value according the value of the var ShareImageIdVar. Any ideas how can I get this to work ?

<link rel="image_src" href="" id="ShareImageID"/>
<script>
var ShareImageIdVar = location.href.match(/\d+/);
document.getElementById('ShareImageID').href = "http://www.mysite.com/Images/"+ ShareImageIdVar +".jpg";
</script>
  • 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-31T01:00:50+00:00Added an answer on May 31, 2026 at 1:00 am

    To get Facebook to select a photo, you need to specify the og:image meta tag in the head section. See http://ogp.me for info on how to set those up properly. Once you got those setup correctly, then lint the url at https://developers.facebook.com/tools/lint

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

Sidebar

Related Questions

I'm trying to create a website that will automate project setup. I want to
I am trying to implement Facebook Connect functionality into a website that I am
I am trying to create a views system on my books website. I have
I am trying to create facebook app with the website url http://www.odipi.com/ but it
I am trying to create a website that retrieves photos for users randomly and
I am trying to create a facebook like website here http://likes.vermilionsite.com/ but when you
I am trying to create a website. I have created a vertical drop down
I am trying to create a website that will allow users to login with
I have a website that I have registered as a facebook app - I
I'm trying to create a small website in ASP.NET MVC that uses twitter. 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.