registering feed problem
louis
7 posts
|
page 114 of B7.0: “We’ll do this by calling AttackPublisher.register_attack_feed. Give this a try in script/console. You should get an integer as a return value.” i get: Facebooker::Session::MissingOrInvalidParameter: The small story template is a required parameter, and it must be of type string in my AttackPublisher model, i have the method exactly as listed in the book:
i’m opening script/console, and entering the model + method as listed in the book. i assume no one else is having this issue since i see nothing in these forums. does anyone know how to resolve it? i assume the .register_ method registers the template by the method name in the model, and uses the return value of the method as the ‘string’. am i wrong? i believe i have the latest version of facebooker (i script/plugin update’ed). any pointers are much appreciated. |
zhao lu
13 posts
|
Sorry if I’m only pointing out the obvious. Have you tried to put in the short story template as indicated in the error message. the message says small story but I assume it means short story. def attack_feed_template
one_line_story_template “{actor} {result} {defender}” +
” with a {move}.”
short_story_template “{actor} engaged in battle.” ,
“{actor} {result} {defender} with a {move}.” |
Allen Walker
19 posts
|
Getting the same thing:
And I defined the “small_story_template”
|
zhao lu
13 posts
|
You are right, I’m getting the same error as well. I also downloaded the lastest tar ball for facebooker from github. Looking at the history the lastest check-in was made about 11 hours ago (it’s 7pm pacific, monday). We’ll probably need to look deeper into the code to see why the out-of-date error is being thrown to us. sigh. |
Allen Walker
19 posts
|
Just to let you know, I was able to publish in my rails web code, just not thru script/console. Don’t ask me why. |
zhao lu
13 posts
|
First of all, congrats! |
Allen Walker
19 posts
|
here are my methods: class ActivityPublisher < Facebooker::Rails::Publisher
Publishing in controller: ActivityPublisher.register_action |
zhao lu
13 posts
|
thanks for sharing allen! I figured out my problems. There were quite a few: 1. in config/facebooker.yml, i forgot to uncomment this line:
2 – 4. all rookie mistakes here and there. but now i can publish feeds. I noticed that you are publishing actiion_template, which is something i haven’t done but tempted too. |
Mike Mangino
148 posts
|
zhao, Thanks for posting your solution. I had hoped that Facebook would have made api.facebook.com use the new API servers by the time this beta of the book was released. I’ll be making a change in Facebooker to use the new API servers by default. |
Mike Mangino
148 posts
|
I just published the change to Facebooker. If you update the library it will now default to the new API. Allen, it worked for you via the web earlier because Facebooker detects that a request is coming from the new API and adjusts accordingly. When you ran the same code through script/console, Facebooker defaulted to the old API. |
10 posts, 4 voices
