3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/facebook_share_link.rb', line 3
def FacebookShareLink.link(options)
raise FacebookShareLinkError, 'Missing app_id' if options[:app_id].nil? || options[:app_id] == ""
raise FacebookShareLinkError, 'Missing redirect_uri' if options[:redirect_uri].nil? || options[:redirect_uri] == ""
facebook_dialog_path = "http://www.facebook.com/dialog/feed?"
queries = options.collect do |key, value|
to_query(key, value.to_s)
end.sort * '&'
facebook_dialog_path + queries
end
|