Most of the news/blogs websites include RSS feeds link in their header. For example:
<link rel="alternate" type="application/rss+xml" title="Example Feed" href="http://example.com/feed/" />
I want to know what is the practical use of adding above? Is it to tell the browser that the website has RSS feeds? In past Firefox has the button in the address bar, but now they have remove it. Also if some user want to subscribe the RSS, he needs to enter the feeds url directly. So where it is being used? Thanks
Yes, it is to tell anything consuming the page (e.g. a browser) that there is an alternative form of the content elsewhere.
Most browsers used to all have an RSS button that would light up if it saw this, to allow you to subscribe to the feed.
RSS has (arguably) dropped in popularity, so this is less common today by default in browsers. But extensions and so on will still use it.
Or indeed, if you add a "normal" url to something like Google Reader, it will fetch that page, and look for an rss link in the head tag, to find the final feed url.
Related
I'm using the Tweet Lookup API (part of V2). When a user shares a link in a tweet, a preview of that URL is generated in that tweet. I want to recreate this using API. So how can I get the preview image of the URL and also other details like the domain, etc?
For example, if you look at this tweet: https://twitter.com/elonmusk/status/1429907171639103489
If you see the above tweet, there’s a URL preview card, with image of starlink and a brief description of the link. How to get these details through the Twitter API?
I suppose I am a little late, but..!
Unfortunately, to my knowledge there is no way to get the preview image from the twitter API.
You have to find the link from the tweet, get that site and scrape the image from there. Websites can tell twitter what image they want to use by making a tag that has the property "twitter:image"!
--
What you can do, for example, is get the original URL for the post from entities!
E.g. making the tweet look-up like this:
https://api.twitter.com/2/tweets/1532014165686206466?tweet.fields=entities
From there, get the original url, for example from the "unwound_url" in the JSON response of that look-up example.
You need to make a request to that site and from the html response, look for a tag that has the property set to "twitter:image"
In that tags content you have your image link!
See:
https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets-id
https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
I hope my rambling made sense and good luck!
Unfortunately, this is impossible because Twitter requires URLs with Twitter meta tags in order to show these Links as cards with images. So the only way to do that is to add these meta Tags in the head of your website :
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="LINK TITLE HERE">
<meta name="twitter:description" content="LINK DESCRIPTION HERE">
<meta name="twitter:image" content="PREVIEW IMAGE HERE">
This is how I made it on my own website. I hope that will help you.
i have a problem with sharing links of my website in Google+. So, if i want to share a link of my website (http://www.droidwiki.de/Hauptseite) G+ say, that the webpage can not be loaded. Same problem is with the Google +1 button on the page. If someone click this button, it appears a red exclamation mark. Sometimes, only the URL, but no opengraph data will show, but the most time, it only doesn't work. Other websites work perfectly with the account.
The same pages work without errors on facebook, will show the title of page and the opengraph description.
Have anybody the same problem, or a solution?
Thanks!
I'm not seeing any of the errors you're reporting.
While OpenGraph is supposed to work with Google's bot, it often doesn't work that well. Best practice is also to include schema.org microdata so Google's plus bot and search bot process it. See https://developers.google.com/+/web/snippet/ for details and http://www.google.com/webmasters/tools/richsnippets for a tool to help you test your markup.
Example an online learning application that you want to share your results which are behind a logged in part of your site. So you add a public URL to your site for google to fetch the content (img, description, title):
data-href="http://www.example.com?result_id=24".
But then when someone views the post and sees the shared content and clicks the link to the site it goes to:
http://www.example.com?result_id=24
The only way I can think of is redirecting the user to http://www.example.com once they land on the shared URL.
Is there an official way or better way to do this?
Thanks
No, but there is a work around.
The URL that you share is used for both the snippet and place users are sent when they click.
However, you can put schema.org or OpenGraph markup on these pages that describes the content behind the login wall. This will allow you to specify a title, description and thumbnail. You can read more about configuring your snippet on Google Developers.
I have integrated the Google +1 button into a website ( http://www2.highpoint.edu ).
I tried to use schema.org <meta> tags to provide Name, Description, and Image for the +Snippets information, but it doesn't work.
When I use the +1 button and try to post to Google+ about the website, it picks an image that I don't want. And it won't pick the image I have set with the <meta> tag.
My questions:
How do I get the +Snippet data populated from schema.org metadata?
For a page with 2 or more +1 buttons, can I have different name/description/image for each +1 button? Or must every +1 button on the page use the same metadata?
EDIT
I think it is best to use Open Graph Protocol instead of schema.org. That is, schema.org shouldn't be used at all. Facebook supports Open Graph Protocol, so you can kill 2 birds with 1 stone this way.
More importantly, Facebook provides a great debugging tool that tells you what exactly is getting parsed for a given URL: http://developers.facebook.com/tools/debug
I am still not sure about having multiple +1 buttons on the same page with each +1 button having distinctly different meta data.
In response to question 1:
I checked your page. It looks like you have a normal meta title and description. This should work for the +1 button, but it may take some time for the +1 button to pick up the changes you've made.
If you'd like control of the image, though, you will need to use schema.org markup or open graph as described in the official FAQ: http://code.google.com/apis/+1button/#plus-snippet
And for question 2:
If you are using schema.org markup, the +1 button will read the content for the itemscope nearest the top of the page's source code.
It does not work for me either. I have both Schema.org and Open Graph in the web page (eg. http://r.mycrep.net/3Nkh/), Multiple validators (Facebook's and one other) read info correctly.
I guess that Google still does not support metadata for everybody :-(
In my asp.net 3.5 C# application I had RSS feed in some of my web pages.I am using SyndicationItem object to prepare RSS feed and using using System.ServiceModel.Syndication dll to prepare RSS page.
I want them to be auto discoverable i.e The RSS feed button in IE at the browser level should get highlighted when we go to the page with RSS feed. Let me know how to do this
It depends how you define auto discoverable.
If you are referring to the way a web browser will place an RSS feed icon in the address bar (like on SO) then you need to place the following code into the HEAD section of a web page the user is viewing:
<link rel="alternate" type="application/atom+xml" title="Feed Title" href="http://rss-URL">
The code does not go in to the RSS feed. This approach will also allow search engines to find your feed.
It is also worth passing your feed via the http://validator.w3.org/feed/ as this will check it is valid and give you extra tips to ensure it is formatted in the best way.
You need to put the following meta tag into the header of your HTML page:
<link rel='alternate' type='application/rss+xml' title='RSS' href='/my_rss.html'>