Sha256: cb0db038e0f00928ba3fc218884e8c7ab64e5d2de425e45ec0b3226e5fdb607d

Contents?: true

Size: 826 Bytes

Versions: 20

Compression:

Stored size: 826 Bytes

Contents

# Replace FACEBOOK_ACCESS_TOKEN with valid token with publish_stream extended permission
#
# Post to user's feed.
#   curl -F 'access_token=...' -F 'message=Hello, Arjun. I like this new API.' https://graph.facebook.com/me/feed
# curl -F 'access_token=112157085478818|2.AlP5TBjZ9F6wOXPX_V0GTg__.3600.1273777200-756314021|NV7Dnuol59KbQr6W1axv6ZmytaI.' -F 'message=Hello, Arjun. I like this new API.' https://graph.facebook.com/me/feed
FACEBOOK_ACCESS_TOKEN = '112157085478818|2.Dq5RDPHxhsgaeScc_fiigg__.3600.1273831200-756314021|Tvm41skDwOdGR2O3Lz4owMVz1lM.'

require 'rubygems'
require 'pp'
require File.dirname(__FILE__) + '/../lib/fgraph'

# Post to current user's f eed
pp FGraph.publish_feed('me', :message => 'Hello. I like this new API.', 
  :access_token => FACEBOOK_ACCESS_TOKEN)
  
puts "Message successfully posted."

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fgraph-0.7.0 examples/publish_feed.rb
fgraph-0.6.2 examples/publish_feed.rb
fgraph-0.6.1 examples/publish_feed.rb
fgraph-0.6.0 examples/publish_feed.rb
fgraph-0.5.1 examples/publish_feed.rb
fgraph-0.5.0 examples/publish_feed.rb
fgraph-0.4.0 examples/publish_feed.rb
fgraph-0.3.4 examples/publish_feed.rb
fgraph-0.3.3 examples/publish_feed.rb
fgraph-0.3.2 examples/publish_feed.rb
fgraph-0.3.1 examples/publish_feed.rb
fgraph-0.3.0 examples/publish_feed.rb
fgraph-0.2.1 examples/publish_feed.rb
fgraph-0.2.0 examples/publish_feed.rb
fgraph-0.1.5 examples/publish_feed.rb
fgraph-0.1.4 examples/publish_feed.rb
fgraph-0.1.3 examples/publish_feed.rb
fgraph-0.1.2 examples/publish_feed.rb
fgraph-0.1.1 examples/publish_feed.rb
fgraph-0.1.0 examples/publish_feed.rb