Which option is the best and easy way to post text or some other content on a Facebook page?
I'm looking for a direct way to put something there from my Rails application.
For instance, clicking on a button and automatically posting on my application and sending data to the facebook page?
I've built one for Twitter and the method I have looks like this:
def tweet(url)
Twitter.configure do |config|
config.consumer_key = APP_CONFIG['twitter_consumer_key']
config.consumer_secret = APP_CONFIG['twitter_consumer_secret']
config.oauth_token = APP_CONFIG['twitter_access_token']
config.oauth_token_secret = APP_CONFIG['twitter_secret_token']
end
shorted_url = shorten_url(url)
Twitter.update("#{title} - #{shorted_url}")
end
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…