• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Freebase and the iPhone
 

Freebase and the iPhone

on

  • 2,975 views

A presentation at the December Freebase meetup about the Freebase.framework iPhone library

A presentation at the December Freebase meetup about the Freebase.framework iPhone library

Statistics

Views

Total Views
2,975
Views on SlideShare
2,741
Embed Views
234

Actions

Likes
1
Downloads
19
Comments
0

6 Embeds 234

http://blog.freebase.com 223
http://www.slideshare.net 5
http://translate.googleusercontent.com 2
https://www.linkedin.com 2
http://www.hanrss.com 1
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Freebase and the iPhone Freebase and the iPhone Presentation Transcript

  • Freebase on the iPhone Alec Flett <alecf@metaweb.com>
  • Freebase on the iPhone Tonight: • Freebase.framework • PhotoBase • Hacking
  • Freebase.framework What’s included: • Static library • Fully Asynchronous API access • CocoaTouch (iPhone) widgets
  • Freebase.framework • Static library • Help. I don’t know what I’m doing • API stuff mostly works on OS X too • Even works with PyObjC!
  • Freebase.framework • Freebase APIs • login • mqlread, mqlwrite • search, geosearch • imageThumb, blurb • image upload • touch
  • Freebase.framework APIs Delegate/selector model FreebaseSession *session = [FreebaseSession session]; [session <apicall>:<query> name:@”convenience_name” delegate:obj didFinishSelector:@selector(someselector:name:etc:) options:[NSDictionary dictionary...]]; • “name” is just useful • “options” is optional
  • Freebase.framework APIs delegates and didFinishSelector • specific selector called on success - (void)querydone:(id)result name:(NSString*)name cursor:(NSString*)cursor; • cursor is mqlread only • errorDidOccur:name: on failure
  • Freebase.framework • CocoaTouch widgets • FreebaseTable - infinite scrolling, sections, thumbnails • FreebaseSuggest - pick a topic, with location support • FreebaseDetail - minimalistic topic view
  • FreebaseTable
  • FreebaseSuggest
  • Geolocation
  • Topic chosen
  • PhotoBase More than just a sample app...
  • PhotoBase Take a picture Choose a topic Upload to Freebase
  • PhotoBase Logging in [[Freebase session] login:@”alecf” password:@”nice try”, delegate:self didFinishSelector:@selector(loggedin:)];
  • PhotoBase Choosing a topic FreebaseSuggest uses search/geosearch, mqlread, blurb, imageThumb
  • PhotoBase Use FreebaseSuggest FreebaseSuggest *fbs = [[FreebaseSuggest alloc] init]; fbs.delegate = self; [self presentModalViewController:fbs animated:YES]; // callback definition - (void)suggest:(FreebaseSuggest*)suggest itemSelected:(NSDictionary*)item { NSString* topicName = [item objectForKey:@”name”]; ... }
  • FreebaseSuggest Finding topics: [session search:@”x-men” name:@”suggest” delegate:self didFinishSelector:@selector(haveResult:)]; Or geolocate: NSString *location = [[NSDictionary dictionaryWithObjectsAndKeys: @"Point", @"type", [NSArray arrayWithObjects: [NSNumber numberWithDouble:longtitude], [NSNumber numberWithDouble:latitude], nil], @"coordinates", nil] JSONRepresentation]; [session geosearch:location name:@”suggest-geo” delegate:self didFinishSelector:@selector(haveResult:)]; (geolocate + search string is complex)
  • PhotoBase Choose or take a picture (Built into iPhone API: UIImagePickerController)
  • PhotoBase Now upload...
  • PhotoBase Upload implementation: [[FreebaseSession session] uploadImage:image contentType:@"image/jpeg" topic:[topic objectForKey:@"id"] delegate:self didFinishSelector:@selector(uploaded:) options: [NSDictionary dictionaryWithObjectsAndKeys: @"/en/creative_commons_by_sa_2_0", @"license", nil]];
  • PhotoBase What’s left: • UI stuff - user feedback, login setup, etc Whats next: • Topic geotagging • QR importing • Flickr search • English/metric, distances, etc
  • Freebase.framework
  • Freebase.framework Do a little dance
  • Freebase.framework Do a little dance Make a little app
  • Freebase.framework Do a little dance Make a little app Lets hack tonight
  • Freebase.framework Do a little dance Make a little app Lets hack tonight
  • Freebase.framework Do a little dance Make a little app Lets hack tonight Questions?