Encoding key-value pairs in an RSS feed's URL - web-services

I've noticed that most websites don't set up their RSS feed URLs to make use of encoded key-value pairs that let one create specific queries, like the following fictional example:
http://stackoverflow.com/feeds?tag=python&lang=en&minvotes=2
Is there a particular technical reason for this? Or am I just not finding the RSS feeds that do this?

There is no technical reason. My company does this now with our news feeds.
I'd post a link, but it requires registration to see the feeds. We have urls like .../feed.php?type=news, etc.

Related

Google Analytics - Match URLs on Unique Number in Content Drilldown Using RegEx?

I am trying to track pageviews on Google Analytics for knowledge base articles (on Zendesk).
Each article has a unique number. However, the title of the page is sometimes appended to the URL, and GA tracks this as a separate page. If the title of the article changes, it generates a new URL.
For example, these would all be the same article, so I want to see a single pageviews count, but GA would show as 3 separate stats
/hc/en-us/articles/360039413394
/hc/en-us/articles/360039413394-How-To-Make-A-Sandwich
/hc/en-us/articles/360039413394-How-To-Make-A-Turkey-Sandwich
I want GA to roll up the articles matching on the unique number, and ignoring everything after that. Is there a built-in way to do this? Is there a way to do this with Regex? Where would I add the Regex for the Content Drilldown page? Help!
Thank you.
Analytics cannot know in an integrated way which part of the URL interests you or which distinguishes one page from another.
What you should do is understand when in your system the page title is appended to the URL and avoid it.
For future data you can try to clean the data with a regex before it arrives in Analytics, for example with GTM, but this could compromise the other URL cases that need to be handled differently.
In general, if in the Analytics reports you filter the URLs for an identifier, for example 360039413394, in the first row of the report you can see the aggregated values of all the URLs that contain that string. So if you need to verify a particular product page you can use this workaround when viewing data.

Facebook Graph API to search user statuses

I am trying to pull some of my facebook statuses that contain a particular keyword and show them on a web page, what is the url query string I should use?
The best I can came up with is graph.facebook.com/me/statuses
But it returns all the statuses, but i want statuses that contain a particular keyword, such in a search, how should I do it? Or is it even possible?
You'll have to manually go through the statuses returned from /me/statuses to find the ones that you care about. Facebook doesn't really let you use their computing power to search stuff like that.

Extracting out the important information from a web page when provided with only the URL

What I'm referring to is what apps like Facebook and Twitter do when someone posts a link. They are able to convert that link into a title, an important image and (sometimes) a short summary.
What I'm asking is: is there some trick to this using tags, rss or metadata or do you have to sign up for a web service which does this for you or write the code yourself, downloading the HTML and parsing it to extract out a guess to the components you want?
http://ogp.me - They all use the open graph protocol or others. The answers are in the meta tags.

Can I have my app scan my Twitter stream for news to show the user?

I would like to be able to show short news messages to users of my app. I am thinking the nicest way to do this would be to add a hashtag (like #appnews) to my Twitter updates that I want shown in-app; my app will make this happen by scanning my Twitter stream at startup and surfacing updates with that hashtag. This seems super-simple, and I'd like to know if there's some way to do this via built-in (HTTP?) calls to my Twitter page, rather than incorporating a whole framework like MGTwitterEngine. The user will not be logging in or posting Twitter updates at any point.
Thanks!
You can retrieve any user's public tweets in XML format by retrieving the following URL:
http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=DWRoelands
(This example will display my tweets). Once you've got the list of tweets, you can parse through the XML document in whatever way is easiest for you.
Rather than tagging posts with a hash tag, I would recommend simply starting a new Twitter account that is solely for the news items you described.

Django url image extraction like facebook

Does anybody know if there is a pluggable app that you can use to achieve url like image extraction for Django?
I dont know if there is a pluggable app that will do this for you, but you can probably hack this together yourself.
The only 'standard' I know of that facilitates this is oEmbed (http://www.oembed.com/) which basically works this way:
somebody gives you a URL.
you read it, find that its a valid JSON that matches the oembed structure
success!
other than the above, and what I think facebook does as well (since I took a look at a few sites that both twitter and fb would work with and none have any oembed support that I can see), is to work on a case by case basis. They probably had a developer go through a large variety of sites and look at the type of meta tags available. for example, yfrog has a bunch of meta properties that tell you the url directly to the main image being displayed, the owner, the tweet that went along with the image, etc. After that it's best effort guesswork. that's why when you try to share a blog post on facebook, it'll often give you the option of any one of the images that went with that blog post, because it doesn't know which one is the main one.