Facebook does not show thumbnail when a photo is shared - php

I am using the following code to share images on facebook but when the dialog box is shown it does not show the image and once it is uploaded facebook just shows a link to image.
<a name="share" type="button" href="https://www.facebook.com/sharer.php?u=www.example.com/myimage" target="_blank">share</a>

This should work like this
<a href="http://www.facebook.com/sharer.php?s=100&p[title]=Our Site Title&p[url]=http://us.oursite.com/default.aspx&p[images][0]=http://www.history.malc.eu/globe.jpg&p[summary]=Our facebook description that is used on the FB share page." target="_blank">
Share this
</a>
EXAMPLE

Use the Facebook debug tool to see how Facebook processes the URL you're sharing.
The Facebook scraper will look for OpenGraph meta tags. You can reference the image you want as a thumbnail with the og:image and og:image:secure_url
Alternatively, if you wanted to upload the image to Facebook so that it goes into the user's album, you should check out How-To: Use the Graph API to Upload Photos to a User's Profile
To be more clear, you should not be sharing a link directly to the image, but rather to a page which has OpenGraph meta tags, one of which should link to the image.

Facebook doesn't support sharing of plain images, only hyperlinks can be shared. Try posting the same image's link on your profile as status. Facebook won't show you any thumbnail for it but just the link. To share a image on facebook, you have to somehow upload it -_-

From the social plugins docs the share initiates a callback from Facebook to the page you want to share. To affect what that shows you would have a page with meta tags (og:image, og:title and og:description) to affect what Facebook puts in the comment on the users timeline.
To show the image, you'd probably need a hosting 'page' that uses a thumbnail of your image in its meta data so that it appears in the users timeline correctly.
Facebook then polls this periodically. This is very similar to the like mechanism.

Make sure you use dont click on share more than once, after that you cant see additional changed you made for next 24 hours

Related

Redirect image to specific page url from facebook timeline image using sharer.php

I am sharing image using to https://www.facebook.com/sharer/sharer.php?u=[some_image_link].png. When the user click the images in its facebook timeline it goes to the image path. I want to redirect the user to a particular page like http://www.example.com/page.php#/[some_image_link].
Can anyone please help?
You should be sharing a link with the OG meta tags that reflects the photo. Then you should be able to see if the request is coming from a crawler (see: https://developers.facebook.com/docs/sharing/webmasters/crawler) or a normal user and process the request accordingly.

Facebook share button, displaying old description text but a new image

I implemented the facebook share button on my web page, but it displays an old description text, I need to have a new text related to every article that I share, the image is updated as new.
Here is the link it's in arabic: http://achabakamagazine.com/new/articles.php?f=1&issueID=320&categoryID=26&articleID=9675&page=4
Make sure you follow Facebook sharing standards.
After that go to Facebook Url Debugger and check your each url stats.

Why Facebook preview image is not showing up?

I have developed news page in my site and my client want to post the news from my site to
facebook and when he paste news link on the facebook, ideally it should create a facebook
post preview which load snapshot of news and also it populates image [if that page contains any image] in that snapshot.
I have searched on google and I found that I need use https://developers.facebook.com/tools/debug/ and I have used that facebook tool and I found that image is not grabbed while creating snapshot.
Now please someone tell me that what I can do to get image in preview of fb post.
Here is link which is having image in his content but still is not visible in preview.
this link is having image but when I this link on fb, it is not showing up image.
As news are get created automatically, I can add any meta tag because its static solution but I am using news feed which automatically creates new pages.
So I am not expecting any static solution
The reason you are not able to see an image preview is because there is no open graph object specified on that page. For example, you need to add this :
<meta property="og:image" content="http://bevforce.com/sites/default/files/2014-07-31%2003.59.57.jpg"> in your header.
More information about open graph object on Facebook documentation.

Force facebook to show my prefered images of the site in status link update

Is there any way to control of the thumbnail of facebook status update when someone post a link of my website to their FB status? If yes, then can i make it dynamic depending on the link they share?
Yes and it is very easy, on each page simply add the meta tag "og:image" and set the path of your image, "og" stands for OpenGraph. Facebook Documentation
You can also find help on this blog and display a custom title, description, ...
You may also be interested that there is also specific meta tags for links published in Twitter. Twitter documentation.
For your information Facebook cache all the images, so if you change an existing image you may not directly see the new picture
When you are passing the image url pass the dynamic url so that when you alick on any post or page to share on facebook that will share the image of that page not the staic image you entered

Post a link on Facebook wall og:image does not works

i just want to copy and paste my website links on users facebook walls , when share from http://www.tvguide.dk/nyheder/2011-10-15/TV2_satser:_Nu_med_spritnye_v%C3%A6rter_!/ share buttons it works and picks a correct og:image thumbnail ,
however when i copy paste the link on the wall the facebook picks the logo image. insted of og:image value
can you guys help me please
You won't be able to change that, unless you always upload a picture when you post on someones wall! The og:image is only used for the open graph which is used from like and share buttons, comments etc, but not in facebook itself.
Read up on internationalization: http://developers.facebook.com/docs/internationalization/
Your website is in Danish but you have used set locale as en_US. Also the title, type and URL properties are not being interpreted correctly by Facebook. http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tvguide.dk%2Fnyheder%2F2011-10-15%2FTV2_satser%3A_Nu_med_spritnye_v%25C3%25A6rter_%21%2F
Make changes and check the progress at URL Debugger(Linter) given above. If everything fails try including the FBJS SDK and use fb:share-button. I had a similar problem once with WordPress which got solved using the JS SDK

Categories