Skip to content

Instantly share code, notes, and snippets.

@ppworks
Created August 10, 2011 22:56
Show Gist options
  • Save ppworks/1138503 to your computer and use it in GitHub Desktop.
Save ppworks/1138503 to your computer and use it in GitHub Desktop.
[hack] post to facebook via fb_graph
module FbGraph
class Property
include Comparison
attr_accessor :name, :text, :href
def initialize(attriutes = {})
# override for "can't convert Symbol into Integer"
end
end
end
FbGraph::User.me({your_access_token}).feed!(
:message => Faker::Lorem. paragraph + 'http://' + Faker::Internet.domain_name,
:description => Faker::Company.catch_phrase,
:picture => 'http://farm6.static.flickr.com/5143/5883772753_ebff7a4e51_m.jpg',
:actions => [{:name => Faker::Lorem.words(1)[0], :link => 'http://' + Faker::Internet.domain_name}],
:properties => { # fix format
Faker::Lorem.words(1)[0] => {:text => Faker::Lorem.words(1)[0], :href => 'http://' + Faker::Internet.domain_name},
Faker::Lorem.words(1)[0] => {:text => Faker::Lorem.words(1)[0], :href => 'http://' + Faker::Internet.domain_name}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment