Saturday 29 September 2012

Social media rss feeds

This post lays out how to access rss feeds of a number of social media sites.  I got the initial information from Digital Inspiration's post and some playing around myself.  The sites sometimes change the URLs so please let me know if any break so I can update this post.



Facebook:
https://www.facebook.com/feeds/page.php?format=atom10&id=111111111111111
Facebook only publishes feeds of status for Pages - not profiles.  To find the id of a page use: http://graph.facebook.com/<page name>

https://www.facebook.com/feeds/notifications.php?id=111111111&viewer=111111111&key=AAbb1AA1AaaAa1aA&format=rss20
To find the id, viewer and key strings log into your facebook page then change the URL to www.facebook.com/notifications.  This page has a link to RSS at the top which you can right click and copy link address to get this information for your own profile.  If you want to show friends' notifications ask them for their strings - I haven't been able to find a way to get them myself.  Facebook doesn't seem to publicise or document these features so these must be figured out/stumbled upon.


Twitter

http://search.twitter.com/search.atom?q=<search term> or
http://search.twitter.com/search.rss?q=<search term> or 
http://search.twitter.com/search.json?q=<search term> 
 .
Using search terms:
q=word1_word2  results in xml file of tweets containing "word1 word2"
q=word1%20word2 results in tweets containing word1 AND word2
q=word1%20-word2 is "words 1 NOT words2"
q=word1%20word2%20:) lists positive tweets containing :) and :o) and :-) etc.

You can filter by location too with &geocode=<latitude>, <longitude>, <radius> e.g. 
http://search.twitter.com/search.rss?q=&geocode=51.5171,-0.1062,10km

You can get messages tweeted after another tweet using and you can filter by dates (time is set to midnight UTC) using since:yyyy-mm-dd and until:yyyy-mm-dd.

You can specify how many messages to download by adding the rows per page term &rpp=n and &page=m where n has a maximum of 100.  The terms go on the end of any of the links above e.g. http://search.twitter.com/search.rss?q=london&rpp=5. The page term does work but not very well because new tweets are always coming in to shift tweets down the pages.  There is description of this and a much better method using since_id to make sure you get a contiguous list of tweets.

It is possible to add together a load of terms and parameters to get what you need from the twittersphere e.g. 
http://search.twitter.com/search.rss?q=london&geocode=51.5171,-0.1062,10km&rpp=1
There are limitations such as only tweets of about a week old (twitters <recent> tag) are included and there is a rate limit to searches to stop overuse and a maximum of 1000 characters in a query.

More info at dev.twitter's Get Search and Using the Twitter Search API


More feeds

I haven't tried any of the other feeds identified by Digital Inspiration - the best list of rss feeds of this kind I've found so far:

YouTube
Pinterest
Images from Instagram, Picasa, Flickr
Blogs from Tumblr, Blogger, Wordpress
Private feeds from the likes of Dropbox, Foursquare and LinkedIn
Google feeds including Gmail and Google Search



No comments:

Post a Comment