My ruby codes was running OK but now I just found random exceptions thrown. I traced down and it seems like a FB bug. Look below. If I provide the valid URL to the link parameter when creating a page post, there's exception. If I change it to other random stuff then it's OK. Then after a few other tries if I come back to try the same URL it's OK this time.
--
[26] pry(FB::Post)> attrs[:link] = 'http://www.groupon.com/deals/new-health-centers'
=> "http://www.groupon.com/deals/new-health-centers"
[27] pry(FB::Post)> graph_post.put_connections(FB.config.page_id, 'feed', attrs)
Koala::Facebook::ClientError: type: OAuthException, code: 1500, message: (#1500) The url you supplied is invalid [HTTP 400]
from /Users/wedeng/.rvm/gems/ruby-1.9.3-p385/gems/koala-1.6.0/lib/koala/api/graph_api.rb:470:in `block in graph_call'
[30] pry(FB::Post)> attrs[:link] = 'http://www.groupon.com/dealx/newshealthscentersxxxxxxxxxxxxxxxxxxxxxxxxxx'
=> "http://www.groupon.com/dealx/newshealthscentersxxxxxxxxxxxxxxxxxxxxxxxxxx"
[31] pry(FB::Post)> graph_post.put_connections(FB.config.page_id, 'feed', attrs)
=> {"id"=>"60004615820_10151782223830821"}