Problem attaching links to posts

2,666 views
Skip to first unread message

themire

unread,
Aug 2, 2010, 1:17:22 PM8/2/10
to facebooker
Hi,

I've recently started getting a problem attaching links to posts,
using the old API, this used to be working for me fine. Maybe
something has changed with the old API, as I believe this
functionality isn't included in the new one.

Anyway,

I'm getting the following error when I try to publish :

--- !ruby/exception:Facebooker::Session::MissingOrInvalidParameter
message: The post's links must direct to the application's connect or
canvas URL.

It's happening when I try to publish to my own profile or to a page,
not including an image.

Does anyone know why this might be happening?
Thanks,
Julian

themire

unread,
Aug 3, 2010, 5:10:27 AM8/3/10
to facebooker
here is how i'm trying it on the command line

opts = {:message=>"a test", :uid=>287599856035}

attachment_hash = {:name => "NAME", :href => "http://
www.google.com", :description => "DESC"}

opts.merge!({:attachment => attachment_hash.to_json})

>> fa.facebook_session.post('facebook.stream.publish', opts, false)
Facebooker::Session::MissingOrInvalidParameter: The post's links must
direct to the application's connect or canvas URL.
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
parser.rb:872:in `process'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
parser.rb:38:in `parse'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
service.rb:67:in `post'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
session.rb:681:in `post_without_logging'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
session.rb:692:in `post'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
logging.rb:20:in `log_fb_api'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/benchmark.rb:10:in `realtime'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
logging.rb:20:in `log_fb_api'
from /Library/Ruby/Gems/1.8/gems/facebooker-1.0.70/lib/facebooker/
session.rb:691:in `post'
from (irb):66
from :0


-----------

It works fine if I don't attach a link.

Anyone any idea? I'm baffled.

themire

unread,
Aug 3, 2010, 7:00:53 AM8/3/10
to facebooker
I think this might have something to do with the new data permissions
model.

Accounts connected before that migration seem to be fine but ones for
which I grant the publish stream now don't work. This is not using the
new oauth authentication by the way.

Andy C

unread,
Aug 4, 2010, 10:52:53 AM8/4/10
to facebooker
Yeah, this is the new permissions model - the problem you're having
can be corrected with a setting change in the application control
panel - 'Stream post URL security' needs to be set to false.
Reply all
Reply to author
Forward
0 new messages