Choosing which image shows when you use Facebook's Send button - facebook

I'm trying to add a Like and Send button to me site, but when I click 'send' it randomly picks an image. I've even deleted that image as well as changed that image to the image I want, but it's still displaying the wrong image.
Is there anyway I can choose which image is shown there? I've tried adding the Open Graph Tags to the tag, but again it's still showing the wrong image.
Thanks

You can change it with the open graph tags, but unless you reset the cache on FB's side, it will continue to use the same image as it did.
Facebook scrapes your page every 24 hours to ensure the properties are
up to date. The page is also scraped when an admin for the Open Graph
page clicks the Like button and when the URL is entered into the
Facebook URL Linter. Facebook observes cache headers on your URLs - it
will look at "Expires" and "Cache-Control" in order of preference.
However, even if you specify a longer time, Facebook will scrape your
page every 24 hours.
Facebook URL Linter

Related

Share image does not change in facebook

In my rails application i put social sharing icon of FB.
When i click on FB icon then popup open. Title and desc is display correct which i want but image is not display proper. Popup take a different image from project which i not assigned.
I tried lots of time to change image but not success. I also remove image from project still its display in popup.
What is actual problem i can not found. Fb cache issue or something different.
Any one have a idea then please share it.
Thanks
Once a url has been shared, Facebook's crawler, which has a user agent of facebookexternalhit/1.1 (+https://www.facebook.com/externalhit_uatext.php), will access your page and cache the meta information. To force Facebook servers to clear the cache, use the Facebook Url Debugger / Linter Tool that they launched in June 2010 to refresh the cache and troubleshoot any meta tag issues on your page.
More detail: click
Hope this help

On Facebook share URL, give option to user to choose image

I don't see the answer I'm looking for, so hopefully someone can help.
I have a PHP script, which displays data from an SQL database. The dynamic elements are pulled in, essentially showing details of a job listing. On this page, I have a Facebook share URL.
Example:
<a title="Post on Facebook"
href="http://www.facebook.com/share.php?u=http://www.mywebsite.com/joblisting/details.php?job_id=1345488636.3750">
POST ON FACEBOOK
</a>
When the user clicks that link, they get the Facebook page to post this to their Facebook page. The page they are on pre-populates with my page title, page description, etc.
And if I have an image on my page, that becomes the default thumbnail image for the FB post. I also set a defualt Facebook image in my metatag, and that works too. I also added up to 10 other images on my page, so that the user could choose from 1 of 10 images as the default thumbnail. But...
I wanted to be able to let the user choose a thumbnail image from their desktop. Is this possible?
The image that's used in the Share dialog needs to exist somewhere on the web before the dialog is invoked, so you'd need to allow the user to upload it somewhere before popping the dialog in order to do what you're suggesting.

Like and Send button not showing picture while posting or sending

I have added the send like and send button to a site i am working on, but i am still unable to show the image of the product that i want to share(like or send). I have added meta tags with correct image url.
Can some one help me with it?
If you are adding new, or updating existing og:meta tags you will need to run the url into the Facebook Linter # https://developers.facebook.com/tools/debug
This will force Facebook to scrape the page and update the information is has on the page. This update can only be done by an admin of the page, or is automatically done approx every 24 hours by Facebook

How to make the facebook share spider not to cache the page

I like the share button more than the like button, thats why i'm using it. The problem is that if the title of the page change and when someone paste it into facebook is still with the old title
Sample code
I put span with a tag in the bottom of the page
http://www.facebook.com/share.php?u=http://stackoverflow.com
Using the share functionality is not a good decision since it has been deprecated and is no longer supported, as it clearly states here:
The Share button has been deprecated in favor of the Like button, and
will no longer be supported. Please use the Like button whenever
possible to drive maximum traffic to your apps.
And here:
What happened to the old Share button?
We deprecated the Share Button when we launched the Like button,
because the Like button improves clickthrough rates by allowing users
to connect with one click, and by allowing them to see which of their
friends have already connected.
With that said, to answer your question, it also written in the Like Button guide:
When does Facebook scrape my page?
Facebook needs to scrape your page to know how to display it around
the site.
Facebook scrapes your page every 24 hours to ensure the properties are
up to date. The page is also scraped when an admin for the Open Graph
page clicks the Like button and when the URL is entered into the
Facebook URL Linter. Facebook observes cache headers on your URLs - it
will look at "Expires" and "Cache-Control" in order of preference.
However, even if you specify a longer time, Facebook will scrape your
page every 24 hours.
The user agent of the scraper is: "facebookexternalhit/1.1
(+http://www.facebook.com/externalhit_uatext.php)"
To clear the cache the easiest thing is to just use the Debug Tool.

Share Cache Timeout

How long is the timeout for facebook share cache. I edited all of my pages and changes must be reflected.
If timeout is unlimited, i have to debug all pages via curl etc.
Thanks.
You can manually "clear" the facebook cache by using the Debugger.
Just go there, enter the url you changed and click "debug", that will cause the facebook bot to request the data from your servers even if it was already fetched and cached, and the new data will replace the old.
Edit
800k of pages is a lot, no doubt.
According to the Like Button doc:
Facebook scrapes your page every 24 hours to ensure the properties are
up to date. The page is also scraped when an admin for the Open Graph
page clicks the Like button and when the URL is entered into the
Facebook URL Linter. Facebook observes cache headers on your URLs - it
will look at "Expires" and "Cache-Control" in order of preference.
However, even if you specify a longer time, Facebook will scrape your
page every 24 hours.
(The URL Linter is the Debugger)
But from my experience it's not always the case, I haven't found any pattern to it, but I came across data that was months old and the cache was not clear until i manually used the debugger to extract the new data.
If you still want to manually refresh the data fb has, you can probably write a script that posts the url to the same form action in the Debugger page, I don't think they are using a csrf protection.
In that way you can automate this action for all your pages, it might take a while, but nothing too serious.
I was using window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url_to_share)) to make a share popup and no matter what I did, the cached share was not clearing until I did the following:
Put the URL you're trying to share into the Facebook URL Linter.
Scroll down to the "Share Preview"
Click "See this in the share dialog"
Copy the URL from that page
Put that URL in your window.open([put the url here]) popup and voila!