<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 &lt;<a href="mailto:redinger@gmail.com">redinger@gmail.com</a>&gt; 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&#39;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&#39;t getting in there, even though I didn&#39;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>
&lt;<a href="mailto:mmangino@elevatedrails.com">mmangino@elevatedrails.com</a>&gt; wrote:<br>
&gt; I&#39;ve added support for the new message templates. Check out the<br>
&gt; documentation (<a href="http://facebooker.rubyforge.org/" target="_blank">http://facebooker.rubyforge.org/</a> and<br>
&gt; <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>
&gt; particular)<br>
&gt;<br>
&gt; If you&#39;ve already created a publisher, you will need to re-run the<br>
&gt; script/generate command to create a new migration. By default, Facebooker<br>
&gt; will now keep track of your template ids. To send a message using the new<br>
&gt; API, you&#39;ll need to create two methods. The first returns the templates. For<br>
&gt; example:<br>
&gt;<br>
&gt; class MyPublisher &lt; Facebooker::Rails::Publisher<br>
&gt; &nbsp; def publish_action_template<br>
&gt; &nbsp; &nbsp; one_line_story_template &quot;{*actor*} did stuff with {*friend*}&quot;<br>
&gt; &nbsp; &nbsp; one_line_story_template &quot;{*actor*} did stuff&quot;<br>
&gt; &nbsp; &nbsp; short_story_template &quot;{*actor*} has a title {*friend*}&quot;,<br>
&gt; render(:partial=&gt;&quot;short_body&quot;)<br>
&gt; &nbsp; &nbsp; short_story_template &quot;{*actor*} has a title&quot;,<br>
&gt; render(:partial=&gt;&quot;short_body&quot;)<br>
&gt; &nbsp; &nbsp; full_story_template &quot;{*actor*} has a title {*friend*}&quot;,<br>
&gt; render(:partial=&gt;&quot;full_body&quot;)<br>
&gt; &nbsp; end<br>
&gt;<br>
&gt; The name of the method needs to end in _template.<br>
&gt;<br>
&gt; To register this template, you can &nbsp;call<br>
&gt;<br>
&gt; MyPublisher.register_publish_action<br>
&gt;<br>
&gt; or, to register all templates in a publisher, you can call<br>
&gt;<br>
&gt; MyPublisher.register_all_templates<br>
&gt;<br>
&gt;<br>
&gt; Facebooker will store the template id and the template name in the<br>
&gt; facebook_templates table.<br>
&gt;<br>
&gt; To send a message from a stored template, you&#39;ll need to create another<br>
&gt; method that registers the data:<br>
&gt;<br>
&gt; &nbsp;def publish_action(f)<br>
&gt; &nbsp; &nbsp;from f<br>
&gt; &nbsp; &nbsp;data :friend=&gt;&quot;Mike&quot;<br>
&gt; &nbsp;end<br>
&gt;<br>
&gt; Then, you can call<br>
&gt; MyPublisher.deliver_publish_action<br>
&gt;<br>
&gt; Facebooker will look up the template id automatically.<br>
&gt;<br>
&gt; Let me know if you have any issues with this.<br>
&gt;<br>
&gt; Mike<br>
&gt; --<br>
&gt; Mike Mangino<br>
&gt; <a href="http://www.elevatedrails.com" target="_blank">http://www.elevatedrails.com</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Facebooker-talk mailing list<br>
&gt; <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
&gt; <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
&gt;<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>