The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Creating a Photo Album in Facebook from Smalltalk

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Creating a Photo Album in Facebook from Smalltalk Posted: May 14, 2009 7:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Creating a Photo Album in Facebook from Smalltalk
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

After I uploaded some photos to Facebook earlier using iPhoto, I decided to see how hard the same operation would be from Smalltalk. Here's the code:


"Create an album, upload to it"
album := PhotoAlbum new.
album name: 'Annapolis Coulton Concert'.
album location: 'Annapolis, MD'.
album description: 'Jonathan Coulton concert with Paul and Storm at the RamsHead in Annapolis, MD'.
album visible: 'friends'.
returnAlbum := connection photosCreateAlbum: album.
returnAlbum := aPhotoAlbum

dir := '../images/coulton'.
files := dir asFilename directoryContents.
photos := files collect: [:each |
	| photo |
	photo := PhotoUpload new.
	photo caption: 'Coulton Concert in Annapolis'.
	photo aid: returnAlbum aid.
	photo filename: (dir asFilename construct: each) asString].
answers := connection photosUploadMultiple: photos.

You can see how wrapping a small UI on that would be pretty simple. Heck, most of the code is just creating the domain objects that are required for the calls :) The code is all in the public store, in FacebookBundle

Technorati Tags: ,

Read: Creating a Photo Album in Facebook from Smalltalk

Topic: And Books Join the Club Previous Topic   Next Topic Topic: The Times Reader for $15 a month

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use