Facebook Share / Like Default Image, Title, Description text

We use the functionality of FB Like / Share on different pages for our client sites. On each page we want to share, add the following to the meta tags:

<head id="ctl00_Head1"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Expires" content="0" /> <meta http-equiv="X-UA-Compatible" content="IE=8" /> <!-- social sharing metadata --> <meta property="og:title" content="Our Site Title" /> <meta property="og:description" content="A description to be used in the share dialog." /> <meta property="og:image" content="http://us.oursite.com/images/FB_ShareThumbnail_US.png" /> <title>Our Page Title</title> <!-- favicon --> <!-- stylesheet and js links --> <!-- inline js --> </head> 

In addition, we also show Facebook graphics with the following HREF:

 <A href="http://www.facebook.com/sharer.php?u=http%3a%2f%2fus.oursite.com%2fOurPage.aspx%3fid%3d999&amp;t=Our+Site+Title" target=_blank><IMG src="/images/Facebook_icon_20x20.png"></A> 

The client would like to use a standard image, title, description, regardless of the actual general page / article (a kind of "brand control"). Currently, we have set our og: meta tags setting to display the same data for each page / article.

When users click on the “common” features, they don’t get the image of the page / article, nor a good description or title (since I thought the tags should have provided).

The pages currently available are accessible to anonymous users, so the FB bot can access the pages. The image specified in the og meta tag is also available to anonymous users. The first question is why does this sharing method not use the correct default values ​​for sharing?

Next question: the next function request is to have access to authenticated pages with the same image, title, default description. I approached this from the point of view of the server, where I looked for the FB bot and redirected the bot to a "static" page containing only the minimum markup needed to extract the image, name, description. I have proven this and it works very well. I just feel that it can be a little complicated. Want to know if there is a “better” or more “better” way to share authenticated pages and find out what sharing features they know about our standard image, title, description?

Thanks in advance!

Update: I found this related Q / A in StackOverflow: Facebook Share does not show my description or my thumbnail

When I ask: “It's amazing if there is a“ better ”or more“ better ”way to share authenticated pages and know the sharing functionality of our standard, title, description?", This is the type of thing I'm talking about. If I can transfer all the data necessary for the sharer.php file to Facebook using the request parameters (and this does not lead to the need / removal of the Facebook scraper), this is ideal, then I do not need to write server side logic to re-route the Facebook scraper . I tried to take the Url provided in the above Q / A, reformat with my data, but no luck. I wonder if this is somewhere registered on FB?

+7
source share
3 answers

There are several reasons why it does not use the provided metadata, but if you do not provide us with the code / URL, we can only guess what might be the problem.

  • Make sure the og metadata is inside the <head> , as it will not look for it elsewhere. If you define them in the <body> tag or elsewhere, it simply ignores them.
  • If the pages were added before you added the metadata, you need to update the Facebook cache file for the page by specifying the URL of the Facebook linter tool .

If none of these steps resolve the issue, submit the URL / code.

Regarding your question about authenticated pages, you can simply add this metadata to a public, non-authenticated version of the page without checking whether it’s Facebook or not, because when someone shares the page, the same information becomes public, regardless of Facebook users who access the page have access to the page or not.

+9
source

After some further digging, I found a way to work with the "sharer.php" functionality to specify the exact image, Url, Title, and description that I want to display without relying on the OG meta tags. This will work for anonymously accessible pages as well as for pages that require an authenticated user. A related Q / A StackOverflow (http://stackoverflow.com/questions/2950189/facebook-share-doesnt-show-my-description-or-my-thumbnail) made me head in the right direction, then after some digging, I found several other posts on the Facebook developer forums (http://forum.developers.facebook.net/) by searching for "sharer.php". This, in particular, led me to where I needed to: http://forum.developers.facebook.net/viewtopic.php?id=101127

In essence, there is no need for OG meta tags. Just make sure that the fragments of your URL are correctly encoded and that you are using the correct parameter keys (that is, "& p [title] =" and not "& t =".

After removing the OG meta tag from our site / pages, I also changed our Facebook sharing button / link to display the following markup:

 <a href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=Our+Site+Title&amp;p[url]=http%3a%2f%2fus.oursite.com%2fdefault.aspx&amp;p[images][0]=http%3a%2f%2fus.oursite.com%2fimages%2fFB_ShareThumbnail_US_90x85.png&amp;p[summary]=Our+facebook+description+that+is+used+on+the+FB+share+page." target="_blank"> <img src="/images/fb_icon_20x20.png" /> </a> 

Please note that I was tempted to find out if I could find a parameter that allowed me to specify a default message, but this was not a requirement for us, so maybe later I will dig this information.

+4
source

How about this now: https://developers.facebook.com/docs/sharing/webmasters/crawler

You just need to add the facebook crawler whitelist

0
source

All Articles