How to: Update FriendFeed using ASP
By StrangeWork.com: Last week the popular feed aggregator FriendFeed launched their new API.
The new API makes it easy for anyone to create custom applications to interact with FriendFeed.
Below is a script I wrote in ASP to post an image and link to your feed stream using XMLHTTP. I’ve included the complete script for download at the bottom of this post.
‘*** set your FriendFeed username and remote key variables
‘*** your users can obtain their remote key here: http://friendfeed.com/remotekey
ff_username = “username”
ff_remotekey = “remotekey”
‘*** set the URL you want to link to
ff_url = “http://snapfoo.com”
‘*** set the text to add to your post
ff_update = “Visit SnapFoo.com”
‘*** set the image URL to post to FriendFeed
‘*** this will be posted as a thumbnail on your feed
ff_filename = “http://snapfoo.com/images/snapfoo_logo.jpg”
‘*** package all of your variables in one variable to post to the FriendFeed API
ff_post = “http://” & URLEncode(ff_username) & “:” & URLEncode(ff_remotekey) & “@friendfeed.com/api/share?title=” & URLEncode(ff_update) & “&link=” & URLEncode(ff_url) & “&image0_url=” & URLEncode(ff_filename)
‘*** post the update
Set xml = Server.CreateObject(“Microsoft.XMLHTTP”)
xml.Open “POST”, ff_post, False
xml.setRequestHeader “Content-Type”, “content=text/html; charset=iso-8859-1”
Set xml = Nothing
That’s it! Using the above method you can easily create scripts to update FriendFeed with text, links, and photos!
Download Source File to Update FriendFeed using ASP