<meta property="og:url" content="http://localhost:8821/EventRegister.aspx" />
<meta property="og:title" content="Welcome and Share Test" />
<meta property="og:description" content="Hope it worked!!!!!!!" />
I am developing an asp.net project and wanted to put a facebook share button in it. I wrote that code in head /head part and then started the debug mode and tried the link:
https://www.facebook.com/sharer/sharer.php?u=http://localhost:8821/EventRegister.aspx
But all I got is a empty share page with no title or description only just the localhost link in description.
How can I make it work? I want customizable title, image, description like in the above code. I have been looking for it for 2 days non-stop.
Thanks...
--
UPDATE:
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=sfgsfgsfg&p[summary]=sdgsdgsdg&p[url]=http://localhost:8821/EventRegister.aspx','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)">Click to share.</a>
did this and still same result :(
Yes it is working after I created a free host on myasp.net... :) Do not debug any facebook code on localhost as it won't work because facebook cannot access to your local machine unless you have some workarounds.
Related
This is a really basic (potentially very dumb) question but I can't find an answer scouring the Facebook developer site.
Say your website's main page is www.example.com. And you have a subpage on the site at www.example.com/specific-page.php
On specific-page.php, I'd like to have two buttons next to each other:
A Facebook Like button that when clicked, likes my main domain (www.example.com).
A Facebook Share button that when clicked, shares specific-page.php
Obviously I'd have OG meta tags on specific-page.php (like those below) but both the Share and Like buttons are using that info, so it seems you can't have the Like be attributed to the primary domain and the Share to the specific page's info.
In other words, if the Like button count on www.example.com's homepage showed 143 likes and then someone on specific-page.php clicked Like, I'd want that homepage number to now be 144.
<meta property="og:image"content="http://www.example.com/images/facebookthumb.png" />
<meta property="og:title" content="Example" />
<meta property="og:url" content="http://www.example.com/specific-page.php" />
<meta property="og:site_name" content="Example"/>
<meta property="og:type" content="website"/>
<meta property="og:description" content="Example.com is an exemplary site." />
So I guess my ultimate question is: Is there some way to specify separate OG tags for Like vs. Share?
No, there is no way. Earlier, there was an option to use the FB.ui feed dialog for sharing with custom parameters: https://developers.facebook.com/docs/sharing/reference/feed-dialog
As of April 18, 2017, the following parameters are no longer supported
by Graph API versions 2.9 and higher. For versions 2.8 and lower, the
parameters will continue working until July 17, 2017.
I'm pulling my hair out on this one. I'm trying to share my ASP.Net Web Forms site on Facebook, but the preview doesn't show the Image or Description I have set up. I found this chunk of code that's supposed to do the trick. I put it in my MasterPage, but it just isn't working:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="Head1" runat="server">
<title>MySite</title>
<meta property="og:url" content="http://www.example.com" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="http://www.example.com/img/fbbanner.jpg" />
...
According to Facebook's Sharing Debugger,
The 'og:image' property should be explicitly provided, even if a value
can be inferred from other tags.
...but, hell if I know what that's supposed to mean. What's funny is, if I remove the meta tags out entirely, I get the same error. When I click on "See exactly what our scraper sees for your URL," I see the meta tags in the rendered code... I'm at a total loss. I can't find an article or an answer that was written in the past several years, so I have a feeling the information I'm getting is outdated. I just can't figure out the magic words...
Update Now, suddenly it works fine. I just clicked "Scraped Again" after I posted this, and it seems to be working. I don't really get it... :(
if you are using any cache plugin, make sure you clear all your caches. Also make sure the image you are using has the recommended facebook size: 1200(w) x 630(h) or 600 x 315. If not it will choose randomly some of your images in the website that are suiting the facebook needs. Read more here
While sharing the following URL on LinkedIn I found that LinkedIn is not taking title and description so thought to run debug tool so that it will correct this issue but it's not. Also, like feature is not working for this URL.
https://swertresresult.ph/
And after running debug, it is showing error
Sorry, something went wrong. We're working on getting this fixed as soon as we can. Go Back
This issue is only with this URL.. Similar URL is this (mybridaldresses.pk/bridal-mehndi-dresses-pakistani-designers-2018/) which is working perfectly.
Is there any other way to solve this issue?
While sharing on LinkedIn, you can determine which title, description and image will appear. To achieve this, your pages must contain some meta tags.
The following tags that must exist on your page.
<meta property='og:title' content='Title of the page"/>
<meta property='og:image' content='http://yourdomain.com/test.jpg"/>
<meta property='og:description' content='Description of the page"/>
<meta property='og:url' content='http://www.example.com/URL of the article"/>
Also, there are some limitations for images. Maximum image size is allowed is 1 MB. And smaller images from 80x150px will not be accepted.
I need to share dynamically created URLs in website to Facebook and LinkedIn. I am sharing to Facebook properly and all needed og tags have been set. But for LinkedIn, it is not working.
This is my URL: https://www.fourthambit.com/blogs_fa/102048
It is properly parsed in Facebook and preview is shown correctly.
But the same link is not working in LinkedIn.
Am I missing anything else?
All needed meta tags are set:
<meta property="og:title" content="Indian Media: Then.... Now... and Later" />
<meta content="Sensationalism has become synonymous with the Indian Media, especially Television. In 2008 dur..." name="description" />
<meta property="og:description" content="Sensationalism has become synonymous with the Indian Media, especially Television. In 2008 dur..." />
<meta content="Academic network" name="keywords" />
<meta property="og:image" content="https://www.fourthambit.com/article/getarticlephoto/big/ZGNlZQD4/0/102/20150807050217-12217198186.jpg" />
<img src="https://www.fourthambit.com/article/getarticlephoto/big/ZGNlZQD4/0/102/20150807050217-12217198186.jpg" style="display: none !important;" />
<meta property="og:type" content="website" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
This is the ajax call going while I try to view a preview in LinkedIn update status bar text-area.
https://www.linkedin.com/sharing/api/url-preview?url=https://www.fourthambit.com/blogs_fa/102048
The reason to this problem could be the following:
"Unfortunately LinkedIn caches the data it retrieves the first time the link is previewed and keeps it cached for a week!"
and the solution:
"The only way to “clear” the sharing preview cache for LinkedIn is to trick LinkedIn into thinking your page is a different (and new) page.
This is done by adding a made-up parameter to the link. It doesn’t affect your webpage, but it does force the metadata to be re-fetched.
Example:
Original link: http://beantin.se/consultant-resume
"New" link: http://beantin.se/consultant-resume?1
LinkedIn has launched Post Inspector. You can now do the following to clear LinkedIn Preview cache:
Step 1: Visit https://www.linkedin.com/post-inspector/inspect/
Step 2: Enter your url and click on Inspect, You will see the updated preview image
Step 3: Now try sharing your url on LinkedIn
It could be a caching issue, or it could be a misuse of the LinkedIn API.
If you think you have a caching problem, try...
Inspect your webpage at the LinkedIn Post Inspector.
Try sharing not just example.com, but, example.com/?someFake=Parameter. Since the URL is different, it shouldn't hit the cache.
So, if that's it, then why isn't og:description showing???
Because the LinkedIn API supports two levels:
Level 1: If you supplied an image, show image with title/domain.
Level 2: If you supplied a description, but no image, show description with title/domain.
Is it possible to display: title, image, description, url? No, it is not. I gleaned this over two weeks of struggling with the LinkedIn support team (oh the humanity).
I have added the following code to my website, is video sharing website
<div itemprop="video" itemscope itemtype="http://schema.org/videoobject">
<h1 class="entry-title" itemprop="name">{$video_data.video_title}</h1>
<meta itemprop="duration" content="{$video_data.iso8601_duration}" />
<meta itemprop="thumbnailUrl" content="{$video_data.thumb_img_url}" />
<meta itemprop="contentURL" content="url/videos.php?vid={$video_data.uniq_id}"/>
<meta itemprop="embedURL" content="{$video_data.embed_href}" />
<meta itemprop="uploadDate" content="{$video_data.html5_datetime}" /> >
The problem that google has removed my website from organic search to video search.
Is change the video object to website the right decision ?
Seems like that's not exactly the wrong behavior, just undesired. My guess is that you'd be better off with it as a video (unless you've seen a noticeable hit already). That being said, changing it back to 'website' or something like that may or may not work.