Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 148207bcda
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (24 sloc) 1.088 kb

Facebook Graph Example

The Facebook Graph API is a great example of how powerful RemoteModel is. Facebook auth code adapted from facebook-auth-ruby-motion-example

Facebook Example Pic

Running

You need motion-cocoapods installed to load the Facebook iOS SDK.

It also appears that (as of May 9 2011), motion-cocoapods doesn't play nice with the FB SDK and you need to use rake --trace to get it to load correctly.

You need to specify an FB app ID, which you can create in FB's Developer app:

app_delegate.rby
def application(application, didFinishLaunchingWithOptions:launchOptions)
  ...
  @facebook = Facebook.alloc.initWithAppId("YOUR-APP-ID", andDelegate:self)
  ...
end
Rakefile
Motion::Project::App.setup do |app|
  ...
  fb_app_id = "YOUR-APP-ID"
  app.info_plist['CFBundleURLTypes'] = [{'CFBundleURLSchemes' => ["fb#{fb_app_id}"]}]
  ...
end
Jump to Line
Something went wrong with that request. Please try again.