<div dir="ltr">Same thing happened to me, btw.<br><br>Dave<br><br><br><div class="gmail_quote">On Tue, Jul 15, 2008 at 11:02 AM, Christopher Redinger <<a href="mailto:redinger@gmail.com">redinger@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">FYI, I couldn't get the migration to generate. I went into<br>
publisher_generator.rb and commented out the unless (and end) line<br>
because it wasn't getting in there, even though I didn't have the<br>
migration already. Then it worked.<br>
<div><div></div><div class="Wj3C7c"><br>
On Tue, Jul 15, 2008 at 9:54 AM, Mike Mangino<br>
<<a href="mailto:mmangino@elevatedrails.com">mmangino@elevatedrails.com</a>> wrote:<br>
> I've added support for the new message templates. Check out the<br>
> documentation (<a href="http://facebooker.rubyforge.org/" target="_blank">http://facebooker.rubyforge.org/</a> and<br>
> <a href="http://facebooker.rubyforge.org/classes/Facebooker/Rails/Publisher.html" target="_blank">http://facebooker.rubyforge.org/classes/Facebooker/Rails/Publisher.html</a> in<br>
> particular)<br>
><br>
> If you've already created a publisher, you will need to re-run the<br>
> script/generate command to create a new migration. By default, Facebooker<br>
> will now keep track of your template ids. To send a message using the new<br>
> API, you'll need to create two methods. The first returns the templates. For<br>
> example:<br>
><br>
> class MyPublisher < Facebooker::Rails::Publisher<br>
> def publish_action_template<br>
> one_line_story_template "{*actor*} did stuff with {*friend*}"<br>
> one_line_story_template "{*actor*} did stuff"<br>
> short_story_template "{*actor*} has a title {*friend*}",<br>
> render(:partial=>"short_body")<br>
> short_story_template "{*actor*} has a title",<br>
> render(:partial=>"short_body")<br>
> full_story_template "{*actor*} has a title {*friend*}",<br>
> render(:partial=>"full_body")<br>
> end<br>
><br>
> The name of the method needs to end in _template.<br>
><br>
> To register this template, you can call<br>
><br>
> MyPublisher.register_publish_action<br>
><br>
> or, to register all templates in a publisher, you can call<br>
><br>
> MyPublisher.register_all_templates<br>
><br>
><br>
> Facebooker will store the template id and the template name in the<br>
> facebook_templates table.<br>
><br>
> To send a message from a stored template, you'll need to create another<br>
> method that registers the data:<br>
><br>
> def publish_action(f)<br>
> from f<br>
> data :friend=>"Mike"<br>
> end<br>
><br>
> Then, you can call<br>
> MyPublisher.deliver_publish_action<br>
><br>
> Facebooker will look up the template id automatically.<br>
><br>
> Let me know if you have any issues with this.<br>
><br>
> Mike<br>
> --<br>
> Mike Mangino<br>
> <a href="http://www.elevatedrails.com" target="_blank">http://www.elevatedrails.com</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Facebooker-talk mailing list<br>
> <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Christopher Redinger<br>
<a href="http://www.agiledisciple.com" target="_blank">http://www.agiledisciple.com</a><br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Facebooker-talk mailing list<br>
<a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
</div></div></blockquote></div><br></div>