1

In my web application, I am allowing users to share their affiliate link to Facebook. I am currently doing this using this URL:

<a target="_blank" onclick="return !window.open(this.href, 'Facebook', 'width=640,height=500')" href="http://www.facebook.com/sharer/sharer.php?u=[App_Link]">

This results in a pop-up like this:

enter image description here

I want to be able to enhance this in two ways:

  1. Specify the image that is shown along with this custom post (the company logo)
  2. Specify a custom sentence or two in the Say something about this... text box

Are one or both of these possible?

1 Answer 1

3

Facebook uses OpenGraph to determine what the page is about if those details are blank it will harvest other elements of the page. So if you want custom descriptions and images used then ensure that whatever page is being linked has the following code in the <head></head>.

For example:

<meta property="og:locale" content="en_GB" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Page Title Here" />
<meta property="og:description" content="Page Description" />
<meta property="og:url" content="http://www.example.com/" />
<meta property="og:site_name" content="Example" />
<meta property="og:image" content="http://www.example.com/image-here.jpg" />
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.