 |
|
 |
 |
 |
|
|
|
(via -
docs.google.com ) I read it on 03/07/10 at 08:58 PM
Posted on 03/08/10 at 01:56 AM
|
This documentation is for TwitterOAuth library verision 0.1.x. If you are using trunk (0.2.x) these instructions will be wrong! Try it out live: http://twitter.abrah.am Twitter OAuth is in beta and could change at any time. Feel free to contact me with bug/questions. A full TwitterOAuth lib will be released soon. Currently the code is hacked together and should not be used in production without proper testing. IndexDefinitionsConsumer: the application you are building. registered with twitter. Sometimes referred to as application
User: the user using your application. Token: there are several different sets of tokens usually in key/secret pairs. Consumer token: the token pair Twitter gives you when you register an application. Request token: the first token pair Twitter returns. used to build an authorize URL used to request the access token. Access token: unique to user. Used to access users data. Get the codePull code from http://github.com/abraham/twitteroauthgit clone git://github.com/abraham/twitteroauth.git Process overviewThis is a very simplistic overview of authenticating with Twitter's OAuth. - Build TwitterOAuth object.
- Request tokens from twitter.
- Build authorize URL.
- Send user to Twitter's authorize URL.
- Get access tokens from twitter.
- Rebuild TwitterOAuth object.
- Query Twitter API with new access tokens.
ProcessFor this example we will be using the the index.php from the example folder and it will be located in the web root. public/index.php public/twitteroauth/
Go to https://twitter.com/oauth_clients and register a new application. Fill out what the form. For a callback URL we will be using http://example.com/index.php. Once registered you will get a consumer key and a consumer secret. Those go in index.php Now we create a TwitterOAuth object. The class constructor chooses HMAC-SHA1 as the signature method, and builds a OAuthConsumer object with the app consumer key/secret. $to = new TwitterOAuth($consumer_key, $consumer_secret); With that object we use curl to request a token from twitter. The API URL we hit is https://twitter.com/oauth/request_token. getRequestToken() pulls the tokens from twitter, parses it into an array, and creates a new OAuthConsumer object. $tok = $to->getRequestToken();
Save the tokens for when the user returns from Twitter. Set up the authorization URL. This is the URL the user will visit to tell twitter the application can access their data. https://twitter.com/oauth/authorize is used. $request_link = $to->getAuthorizeURL($token); Once the user tells twitter yes and returns we request the access tokens. The access tokens can be thought of the users passwords and will be used to authenticate as them for future API calls. https://twitter.com/oauth/access_token is used. $tok = $to->getAccessToken();
At this point you can check https://twitter.com/account/connections and the application should be listed. Build a new TwitterOAuth object using consumer key/secret and access key/secret. $to = new TwitterOAuth($consumer_key, $consumer_secret, $user_access_key, $user_access_secret);
Now to interact with the API as the user to verify their credentials. This should return their profile. You can now save the access key/secret as being associated with the returned user info. $content = $to->OAuthRequest('https://twitter.com/account/verify_credentials.xml', array(), 'GET');
To send a status update change the API URL and add a key/value array. $content = $to->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => 'Test OAuth update. #testoauth'), 'POST'); There you have it. Basic interaction with Twitter's OAuth beta. To run other commands just change the API URL and array() keys/values in the last call. LinksMy website: http://abrah.amTwitter: http://twitter.comOAuth: http://oauth.netTwitter API docs: http://apiwiki.twitter.comTwitter API discussion: http://groups.google.com/group/twitter-development-talkFire Eagle OAuth docs: http://fireeagle.yahoo.net/developer/documentation/php_walkthru
Tags: twitter access token oauth key
|
| |
| |
|
|
|
|
|
|
(via -
GOOD ) I read it on 02/16/10 at 12:06 AM
Posted on 02/15/10 at 10:30 PM
|
An initiative in South London has been working to develop a cooperative community atmosphere by uniting small businesses and entrepreneurs with local citizens since October 2009. Utilizing twenty previously unoccupied stalls in the Brixton market, organizers at Space Makers Agency offer young creative-based businesses three months rent-free to simultaneously offer people imaginative new spaces and foster links to the community. Treehugger reports:
[Space Makers Agency] have been working with the local communities, property owners, local authorities, policy-makers and others to create new ways of "of thinking about the spaces in which we live, work and play. Our approach is to start with what is already there: the stories of a place and the people who live there. Then our role is as a catalyst, bringing out the possibilities which were already present in a situation and making connections which might not have been obvious.
Among the shops taking residence in Brixton include vintage clothing stores, a photographer, a childrens puppet show, and a candy store. With a growing number of empty storefronts in a growing number of U.S. cities, a similar investment in community and creative entrepreneurship certainly seems like it could be possible. What metropolis do you think would be a perfect candidate for a Brixton Village-like experiment?
Photo by B. Alter via Treehugger
Tags: brixton community businesses local makers
|
|
| |
| |
|
|
|
|
|
|
(via -
O'Reilly Radar - Insight, analysis, and research about emerging technologies. ) I read it on 01/27/10 at 08:30 PM
Posted on 01/27/10 at 09:42 PM
|
What really jumped out to me as I looked over the iPad's feature set is that the device is clearly built for media consumption. Movies, music, books, news -- the bread and butter content that keeps iTunes humming. That's good for Apple, obviously, but it also creates an interesting opportunity for publishers. They've got a new distribution mechanism and a new canvas.

With that in mind, I decided to filter the barrage of iPad coverage through a publishing lens. What follows are intriguing ideas culled from all sorts of sources. Most revolve around content applications the iPad may provide.
There's no way I'll catch all the good stuff -- there's just too much out there -- so please use the comments area to post links and commentary that grab your attention, publishing-related and otherwise.
Ebook pricing could get interesting
The iPad's release portends a price-point battle between Apple and Amazon. That's ebook pricing, not hardware.
The Wall Street Journal says Apple is pushing book publishers to set two ebook price points, $12.99 and $14.99, with Apple taking its customary 30 percent cut from any sales. They key word in all this is "set." The big kahuna of ebooks, Amazon, controls its pricing. Most bestsellers are parked at $9.99, which is below what Amazon pays a publisher for a title. Amazon is subsidizing its low price point.
But that's the present. The future is a different matter. The thought is that Amazon is taking a short-term loss on ebooks so it can solidify its position as the dominant channel. Once it owns the ebook market, Amazon can ditch the subsidy and force publishers to renegotiate pricing.
That's the fear, and Apple appears to be playing to it by giving publishers an option: get a measure of pricing control through Apple, or make more with Amazon but pray they don't rewrite the rules later. (Apple could always rewrite rules, too ...)
What's really interesting about this -- and kind of bizarre -- is that the binary Apple-or-Amazon thinking obscures an important point: mobile devices already offer publishers plenty of pricing options.
What about e-reader applications?
Steve Jobs famously quipped a couple of years ago that "people don't read anymore." Well, I guess Apple changed its stance on that one. The new iBooks app -- and accompanying store -- is a big ol' cannonball in the ebook pool.
Early discussion on a back-channel publishing list I follow has focused on how Apple will treat its new ebook competitors. Will established applications, like Stanza and the Kindle app, be removed? Kirk Biglione, co-founder of Medialoper, thinks competitors will remain in Apple's universe. Just don't count on sharing titles across apps:
Look for books to be added as a new media type in the device media library. The other reading apps may be able to co-exist as long as they don't access books stored in that library. So, for example, you probably won't be able to use Stanza to read iBooks. [Note: Kirk gave me permission to post his comments.]
One thing to consider here: Past inquiries from the Federal Communications Commission may soften Apple's competitive instincts. At least for a while.
Of course, FCC heat doesn't preclude Apple from a little friendly rivalry. Digital Trends picked up on the backhanded compliment Jobs gave Amazon during the iPad presentation:
... [Jobs] basically told the online retailer that we'll take it from here.
The reading/viewing experience
Apple has already shown what it's capable of on the music and video front, so I'm curious to see how it handles the book experience. Early word is positive from folks who've had a chance to demo the iPad. Here's Gizmodo's take:
It's an optical illusion, but just seeing the depth of pages makes the iBook app feel more like a book than a Kindle ever did for me. The text is sharp, and while the screen is bright, it doesn't seem to strains the eyesbut time will tell on that.
The iPad is backwards compatible with existing iPhone applications. That seems useful on first blush, but Joshua Topolsky of Engadget called out a big issue with "old" apps:
It's kind of silly looking. A lone app in the center of a black screen.
More to come
I'll be adding to this post in the coming days as more analysis bubbles up. Again, please use the comments to point out interesting or informative links you come across as well.
Tags: apple amazon ipad pricing ebook
|
| |
| |
|
|
|
|
|
|
(via -
www.npr.org ) I read it on 01/25/10 at 11:44 AM
Posted on 01/25/10 at 04:42 PM
|
Shared by Kristopher
After making a silly mistake, it's not uncommon for a person to say, "Oops I was on autopilot." In his new book, The Hidden Brain, science writer Shankar Vedantam explains how there's actually a lot of truth to that.
Our brains have two modes, he tells NPR's Steve Inkseep conscious and unconscious, pilot and autopilot and we are constantly switching back and forth between the two.
"The problem arises when we [switch] without our awareness," Vedantam says, "and the autopilot ends up flying the plane, when we should be flying the plane."
The autopilot mode can be useful when we're multitasking, but it can also lead us to make unsupported snap judgments about people in the world around us. Vedantam says that when we interact with people from different backgrounds in high-pressure situations, it's easy to rely unconsciously on heuristics. 'The Hidden Brain' book cover
The Hidden Brain By Shankar Vedantam Hardcover, 288 pages Spiegel & Grau List price: $26 Read An Excerpt
3-Year-Old Bigots?
Racial categorization begins at an extremely early age. Vedantam cites research from a day-care center in Montreal that found that children as young as 3 linked white faces with positive attributes and black faces with negative attributes.
"Now, these were children who are 3 years old," Vedantam says. "It is especially hard to call them bigots, or to suggest that they are explicitly racially biased or have animosity in their hearts."
Vedantam says the mind is hard-wired to "form associations between people and concepts." But he thinks that the links the children made between particular groups and particular concepts were not biologically based those judgments came from culture and upbringing.
"We tend to think of the conscious messages that we give children as being the most powerful education that we can give them," Vedantam says but the unconscious messages are actually far more influential.
He says that for every 50 times a year a teacher talks about tolerance, there are many hundreds of implicit messages of racial bias that children absorb through culture whether it's television, books or the attitudes of the adults and kids around them.
"And it's these hidden associations that essentially determine what happens in the unconscious minds of these children," Vedantam says.
'Take Back The Controls'
In American society, colorblindness is often held up as the ideal. And though it's a worthy aspiration, Vedantam says it's a goal that isn't rooted in psychological reality.
"Our hidden brains will always recognize people's races, and they will do so from a very, very young age," Vedantam says. "The far better approach is to put race on the table, to ask [children] to unpack the associations that they are learning, to help us shape those associations in more effective ways."
Most of us think of ourselves as being conscious, intentional, deliberate creatures. ... I have become, in some ways, much more humble about my views and much less certain about myself.
- Shankar Vedantam
Going back to the autopilot analogy, Vedantam says it's not a problem that the brain has an autopilot mode as long as you are aware of when it is on. His book, The Hidden Brain, is about how to "take back the controls."
So if the human psyche is just a big constellation of conscious and unconscious cognition which thoughts represent the real you?
"Most of us think of ourselves as being conscious, intentional, deliberate creatures," Vedantam says. "I know that I think of myself that way: I know why I like this movie star, or why I voted for this president, or why I prefer this political party to that."
But doing research for this book changed all that, Vedantam says.
"I have become, in some ways, much more humble about my views and much less certain about myself. And it may well be that the hidden brain is much more in charge of what we do than our conscious mind's intentions."
Science writer Shankar Vedantam says we often function on autopilot without even knowing it. His new book, The Hidden Brain, explores how unconscious biases color our decisions even when we think we are acting rationally.
Tags: vedantam hidden autopilot children brain
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 12/29/09 at 08:40 PM
Posted on 12/29/09 at 11:46 PM
|
By Senior Editor Kris Smith (@croncast)
If you're just starting out or a WordPress hack from way back, the new book from Chris Coyier and Jeff Starr titled Digging Into WordPress could be a good addition to your shelf.
Coyier and Starr have been plugging away on WordPress installs for a few years and now sharing their intimate knowledge of the blogging platform.
The book comes in two versions spiral bound and PDF. The spiral version looks beautiful and the PDF, if anything like the sample, should please with its colors and page layout.
The real question about this book is the $67 price tag for the spiral bound version. Is it worth it?
Yes, slices of tree with pretty ink aesthetically pleasing. Yes, it will lay completely flat on a surface next to a computer, unlike traditionally bound computer books. No, it won't every question you have about WordPress. I'm not sure anyone or any book could do that.
If I were in the market for a WordPress book I would take a different approach to justify spending the money on this book consulting. Not that I would buy it and become an instant WordPress consultant. Nor should you, unless you're already a Social Media Expert and have it all figured out.
I mean consulting in the sense that you are getting the best that Coyier and Starr have to offer because their names are on the line with this publication. If the content is not good or they don't add value to solve your WordPress conundrums their names will be mud.
This book should be viewed as an insanely cheap consulting session with two guys that really know their stuff and can prove it with their client work. At $67, you're already halving the rate for most WordPress gurus worth the money and getting two for the price of one 24 hours a day.
They're also offering an affiliate program for those interested in helping sell some copies and to put some extra bucks under that mattress. Check it out if you're into that whole affiliate thing.
I have no material connection with the publishers of this book or am a part of their affiliate program. All links are to standard pages. I am basing my opinion on a sample chapter (PDF) that is available from their sales page.
Related articles by Zemanta
Ready to Dig WordPress? is a post from: TechStartups.com
Tags: Chris Coyier , Digging Into WordPress , Jeff Starr , wordpress books , wordpress consultant , wordpress hacks 
Tags: wordpress book starr coyier consulting
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 12/29/09 at 08:42 PM
Posted on 12/22/09 at 10:03 PM
|
By Senior Editor Kris Smith (@croncast)
You need a pile-o-data fast and you got nowhere to get it other than surf, bookmark and beg for interns to copy and paste for you. Where do you turn? Your IT department? Your hackery skills and your shared GoDaddy hosting account for bandwidth? Nah.
80Legs is ready to run a couple miles with your pile of data on their shoulders. You get to pick it up and work with it as you see fit.
Did I mention that they are now offering this as a free service? Well, up to a certain point it is free but for the many is plenty of room to get what they're looking for.
80Legs offers a unique service that will crawl the internet on your behalf and gather data from the links that you provide. They then take this unstructured data and make it available for further refinement to the customer.
Their value proposition lies in the ability to deliver this service efficiently and affordably. Like I said earlier, it would be difficult if not impossible for an individual run a service to crawl 100,000 pages quickly. 80Legs is offering this as a free service now and it's all powered by a 50,000 computer network.
The ability to put the data collection into another companies hands allows developers to think about what to do with the data. By freeing up developers more can be done with the data that is returned to them as they have time to think about new algorithms to run across the dataset.
An example of this would be simple search. Developers with more time could work on creating new layers to search that make it more valuable to the end user. Whether it is integrating advanced search functionality or returning results contextually depending on the page that a user is currently searching from.
If you're interested, the free Basic specs are below. Plus and Premium are listed on their blog.
80Legs Basic Plan:
- Free to use
- Normal crawling speed (up to 1 request/second/domain)
- Access to 80legs Web Portal
- 1 job running at a time
- Up to 100K crawled pages per job
- Low priority in 80legs job queue
- No recurring jobs allowed
[Via VentureBeat]
Related articles by Zemanta
80Legs, 50k Computers and a Web Crawler is a post from: TechStartups.com
Tags: 80Legs , 80legs spider , 80Legs web crawler , free web crawler , free web spider , unstructured data , value proposition , VentureBeat 
Tags: legs data free service web
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 11/27/09 at 11:08 AM
Posted on 11/26/09 at 07:09 PM
|
By Senior Editor Kris Smith (@croncast)
I am a huge fan of unconventional problem solving and taking approaches to situations that aren't populist. Doing so often requires inspiration from another source unrelated to the matter at hand.
Finding that inspiration is as easy as looking around for a place to stand that you have never stood before. A simple change in perspective is all that it can take to trigger something within you.
.
Example: A Place To Stand
About twice a year I to get some inspiration I stand in a different place online. Since I spend most of my time in front of a computer and the ambient transiency in my space is pretty static I'll stand on the corner of internet and Jeff Bridges dot com and visit his latest posts.
Bridges' website is an exercise in the basics of human communication with static images and image map links to other content but the simplicity is amazingly effective. Why? Because the web has come become a complicated mess of information and displays that vie for attention while Bridges keeps it simple. The site is art.
The effectiveness is deduction of distilling a message down to a graphic is reminiscent of something that Madison Avenue creatives would crank out for a print campaign. With simple copy in the images that he creates they're easier to grasp than a Tweet. The visual tapestry that Bridges creates is linear like a blog, textured like a painting and conversive like asking your grandmother about her past.
What Bridges has done with his personal site is so far from the norm that it has taken me nearly 250 words to describe. I should have done it with an image instead!
Whether you are planning your next startup, in the middle of one or looking to do a site redesign it is helpful to find the right sources of inspiration. Often they are at the very edges of your comfort zone and occasionally just beyond it. Let them gestate and the assimilate them when the time is right.
Photo credit: Screen shot from www.jeffbridges.com
DISCLOSURE OF MATERIAL CONNECTION: http://cmp.ly/0
How To Get Inspired is a post from: TechStartups.com
Tags: comfort zone , how to get inspired , image map , insipiration , Jeff Bridges , madison avenue 
Tags: bridges stand inspiration simple image
|
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 11/27/09 at 11:08 AM
Posted on 11/25/09 at 07:06 PM
|
By Senior Editor Kris Smith (@croncast)
With the imminent release of WordPress version 2.9 on the horizon and my subsequent lack of excitement, it only seems fitting to put together a wish list for the next version. It is even more fitting since Raanan (@raanan) asked, What's on your wishlist for 3.0 ?
I partially answered that question in the comments with the following:
- Semantic integration with Zemanta or OpenCalais
- This would be like having a librarian with a fancy masters degree in categorizing everything on the planet riding shotgun with you while you write.
- WordPress recommended vocabulary for categories
- This could mirror NYT Open Linked Data RDF or other semantic tools
- Image upload and modal window to open in advanced mode for properties control
- This could be a combo of both tabs but something more powerful from the first time the window opens so that users don't need to perform multiple actions to add padding or custom links to images
- Feed only choice for publishing posts
- This doesn't have to be authenticated and would work by same rules with tags, categories, etc. to syndicate for apps or widgets
- Imagine being able to use WP as a CMS to manage the data that is delivered to mobile apps on the iPhone, Android, Blackberry or Palm as one standard
In addition to these four I have some more wishes for this list
- The return of horizontal navigation to the administration panel or the option to choose vertical left side or horizontal suckerfish style
- Integrated gallery function for display in themes
- Yes, there are plenty of plugins to do this but some of that code like the integration of the fabulous WPTouch mobile theme into central codebase would be huge
- WordPress.org installs that allow for gravatar uploads through profiles
- Hook this into the .com API and welcome these users into the fold
- This could turn out to be a great way to make them familiar with the .com platform
- But mainly so users can swap them on the fly with their own installs
- Content libraries from media companies
- Stock photos, video, quotes
- A new API component to allow multiple third parties to supply this content
I'm sure that over the next few weeks I will think about this some more and come up with a couple other ideas. But for now, what's on your wishlist for 3.0 ?
DISCLOSURE OF MATERIAL CONNECTION: http://cmp.ly/0
WordPress 3.0 Wish List is a post from: TechStartups.com
Tags: Android , calais , iPhone wordpress , mobile blogging , opencalais , wordpress 2.9 , wordpress 3.0 , WPTouch , Zemanta 
Tags: wordpress list mobile users wish
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 11/27/09 at 11:08 AM
Posted on 11/23/09 at 03:36 PM
|
By Senior Editor Kris Smith (@croncast)
For those of you unaware, Engadget put on a new face this week and restructured the way stories are found on their site. As part of this new design they began sculpting links with a technique that I'm dubbing URL graffiti. Say what?
They are engaged in a brilliant new system of taggery that shows the maturity of blogs that have thousands of items of content and want to gain the value that they often represent. One method that they have chosen for this is filtering with user chosen tags (graffiti) attached to the end of a tag URL. Example: http://www.engadget.com/tag/att,3g,sony
Why is this brilliant?
It shows a step forward by Engadget and their designers to finding solutions to create value from the long tail. For the public and their own writers there is now an ability to treat all of this content as a reference system. You could also call it a knowledge base, library or archive. Whatever your chosen term, this simple approach to content filtering is hot.
What does it mean?
Access to an entire body of work via multiple tags can begin to yield better search results without forcing a user into a situation where they need to use an advanced search' feature. These are usually blocks of form elements that easily overwhelm a user's sense that they can find what they are looking for with ease and underwhelm them with your information architecture skills.
Take the full example URL above with graffiti as an example then click these three links with varying tag graffiti on the end of them in succession:
- http://www.engadget.com/tag/att // All ATT tagged content
- http://www.engadget.com/tag/att,3g // All ATT and 3g tagged content
- http://www.engadget.com/tag/att,3g,sony // All ATT and 3g and Sony tagged content
As the results wane you are given a better picture of content within Engadget's archive that meets the tag requirements. In this purest form it is advanced search functionality without the mess.
How to use it?
I found this feature because Engadget was already using it in posts. Their writers can use it to create a better picture of previously written content for users that click through. It can also be used by them as a an internal search capability for research on a topic. When you have multiple authors the chances are high that at some point there is another post or a few within the corpus that is similar and a can be used for reference.
In this current iteration this feature for users is a bit limited. Users can tack on their own graffiti to the URL and get results for these topics, but it is more of a command line interaction. It is powerful but not very user-friendly.
How can URL Graffiti from Engadget be improved?
This is a powerful system for content filtering that needs just a few tweaks and can become a ridiculously valuable to the publisher and to users.
- Autodiscovery feed added to page
- Link to this feed in the top section
- Ability to add a .rss or .xml' to query for feed access
- Button to change tag search to OR' instead of And' to increase results pool
- Currently all searches are AND'
- Ex. ATT and 3g and Sony
- New would allow ATT or 3g or Sony
- Text input box with URL graffiti loaded in it for editing to add new tags
- Number of results displayed on page
Below is a comp of some of these changes added into the interface. By no means is it perfect but it is a good start to adding some additional value to users. Click the image to see full size.

For your next client or startup keep this URL graffiti approach in mind as an efficient way to solve content filtering. If it is built in from the beginning you can ensure that you are creating a continued value, even if diminishing, for your content. Let your users throw some graffiti on your work.
DISCLOSURE OF MATERIAL CONNECTION: http://cmp.ly/0
URL Graffiti From Engadget is a post from: TechStartups.com
Tags: advanced search , command line search , engadget , Engadget redesign , engadget tags , Information retrieval , search functionality , taggery , URL graffiti , Usability 
Tags: engadget graffiti content url att
|
| |
| |
|
|
|
|
|
|
(via -
TechStartups.com ) I read it on 11/21/09 at 11:14 AM
Posted on 11/16/09 at 08:37 PM
|
By Senior Editor Kris Smith (@croncast)
While I'm riding this photo wave I thought I would throw out a post for the coders in the house. I am an unabashed supporter tow things RSS and Flickr. When they are both put together they make a magnificent pair.
To demonstrate why they are such a great pair together I put together a bit of code that can make working with Flickr photos a breeze. It is the same code that I wrote that made its way into the self-hosted life streaming software SweetCron.
It is written in PHP but those that do real coding for a living can take a look at it and get the concept pretty quick. With that being said, I will make even easier by pointing out that due to a good naming convention that Flickr uses to organize photos by size it is possible to access all of them quickly without using the full tokenized API. Which, btw, requires more pings to get the same data the feeds offer.
We'll use the PHP function simplexml_load_file to get access to the photo goodness that is resting in the feed. The RSS feeds from Flickr are in a standard format so the code below will work with any of them. However, it won't work for the Atom feeds. I'm sure you could get crazy and figure out an Atom hack if you wanted. Good luck.
Here's how it can be done with PHP and a Flickr user feed:
$feed = simplexml_load_file("URL_to_Flickr_Feed");
// Check to see if the response was loaded, else print an error
if ($feed) {
$results = '';
// If the response was loaded, parse it and build links
foreach($feed->channel->item as $item) {
$media = $item->children('http://search.yahoo.com/mrss/');
// Photo Thumbnail
$sPhoto = $media->thumbnail->attributes();
$url = (string) $sPhoto['url'];
$width = (string) $sPhoto['width'];
$height = (string) $sPhoto['height'];
//
// Photo Medium (500 px wide standard)
$mphoto = substr($sPhoto, 0, -5);
$mphoto = $mphoto . "m.jpg";
// Photo Large (original size)
$lPhoto = $media->content->attributes();
$lurl = (string) $lPhoto['url'];
$lwidth = (string) $lPhoto['width'];
$lheight = (string) $lPhoto['height'];
$lphoto = substr($lPhoto, 0, -5);
$lphoto = $lphoto . "o.jpg";
//
echo $sPhoto; // thumbnail url
echo $mphoto; // medium size url
echo $lphoto; // large size url
}
} else {
echo "Broken Feed";
}
Hopefully this will give someone a jump start in how to transfer large images quickly, say between a photo journalist and an editor half a world away without having to make any other tools than a special XML feed from the Flickr feed. Literally for the $24.95 yearly fee to use Flickr Pro it could be used as a global syndication system.
In the right hands this way of working with Flickr feeds could yield great hacks for devices like the Chumby. Take it one step further for use in digital picture frames as playlists that can be embedded or run from memory cards. I'm just saying these are possibilities.
DISCLOSURE OF MATERIAL CONNECTION: http://cmp.ly/0
PHP simplexml_load_file for Photos is a post from: TechStartups.com
Tags: api , digital picture frames , flickr feeds , flickr rss , php simplexml_load_file , RSS feeds , sweetcron 
Tags: flickr feed lphoto url gt
|
| |
| |
|
|
|
| |
|
|
|
|
|
|
|
|