Created
March 6, 2014 02:34
-
-
Save brentsowers1/9381140 to your computer and use it in GitHub Desktop.
Publishing to a users wall with Facebooker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load access token and expiration from database | |
client = Mogli::Client.new(access_token, expiration) | |
user = Mogli::User.find(facebook_id, client) | |
post = {:name => "main title for the post", | |
:caption => "Sub title for the post", | |
:description => "Long description for the post", | |
:picture => "url to a picture for the post", | |
:link => "url to go to when the user clicks on the title", | |
:from => {:name => "Your app's name", | |
:category => "Your app's category", | |
:id => Facebooker2.app_id}, | |
:actions => [{:name => "Name of the action link at the bottom of the post (beside like and comment)", | |
:link => "URL to go to when user clicks on this link"}] | |
} | |
user.client.post("me/feed", nil, post) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment