<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'registering feed problem' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/59/topics/781</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>registering feed problem posted by Mike Mangino @ Wed, 20 Aug 2008 19:48:56 -0000</title>
      <description>&lt;p&gt;I just published the change to Facebooker. If you update the library it will now default to the new &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Allen, it worked for you via the web earlier because Facebooker detects that a request is coming from the new &lt;span class="caps"&gt;API&lt;/span&gt; and adjusts accordingly. When you ran the same code through script/console, Facebooker defaulted to the old &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 20 Aug 2008 19:48:56 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4238</guid>
      <author>Mike Mangino</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by Mike Mangino @ Wed, 20 Aug 2008 16:29:01 -0000</title>
      <description>&lt;p&gt;zhao, Thanks for posting your solution. I had hoped that Facebook would have made api.facebook.com use the new &lt;span class="caps"&gt;API&lt;/span&gt; servers by the time this beta of the book was released. I&amp;#8217;ll be making a change in Facebooker to use the new &lt;span class="caps"&gt;API&lt;/span&gt; servers by default.&lt;/p&gt;</description>
      <pubDate>Wed, 20 Aug 2008 16:29:01 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4232</guid>
      <author>Mike Mangino</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by zhao lu @ Thu, 14 Aug 2008 18:41:34 -0000</title>
      <description>&lt;p&gt;thanks for sharing allen!  I figured out my problems.  There were quite a few:&lt;/p&gt;


1.  in config/facebooker.yml, i forgot to uncomment this line:
	&lt;ol&gt;
	&lt;li&gt;To develop for the new profile design, add the following key..&lt;br /&gt;api: new&lt;br /&gt;if you look into sessions.rb in facebooker, it&amp;#8217;s using this &lt;span class="caps"&gt;ENV&lt;/span&gt; to determine whether to use new api or not.  I think that&amp;#8217;s why I was getting the &amp;#8220;small story&amp;#8221; error coming out of the old api.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;2 &amp;#8211; 4.  all rookie mistakes here and there.  but now i can publish feeds.&lt;/p&gt;


	&lt;p&gt;I noticed that you are publishing actiion_template, which is something i haven&amp;#8217;t done but tempted too.&lt;/p&gt;</description>
      <pubDate>Thu, 14 Aug 2008 18:41:34 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4135</guid>
      <author>zhao lu</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by Allen Walker @ Thu, 14 Aug 2008 17:30:02 -0000</title>
      <description>&lt;p&gt;here are my methods:&lt;/p&gt;


	&lt;p&gt;class ActivityPublisher &amp;lt; Facebooker::Rails::Publisher&lt;/p&gt;
	&lt;pre&gt;&lt;code&gt;include ApplicationHelper&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;def action_template
end&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;app = link_to("Check out the application to find out more!", { :controller =&amp;gt; "public", :action =&amp;gt; "index" })
one_line_story_template "{&lt;strong&gt;actor&lt;/strong&gt;} will be at {&lt;strong&gt;location&lt;/strong&gt;} in {&lt;strong&gt;locale&lt;/strong&gt;} on {&lt;strong&gt;date&lt;/strong&gt;}. #{ app }"&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;def action(user, activity)
   send_as :user_action
   from user
   data :location =&amp;gt; link_to(activity.location.name, { :controller =&amp;gt; "locations", :action =&amp;gt; "show", :id =&amp;gt; activity.location.id } ),
        :date =&amp;gt; activity.scheduled_at.strftime("%A, %b %d"),
        :locale =&amp;gt; activity.location.city&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Publishing in controller:&lt;/p&gt;


	&lt;p&gt;ActivityPublisher.register_action&lt;br /&gt;ActivityPublisher.deliver_action(current_user.facebook_session.user,activity)&lt;/p&gt;</description>
      <pubDate>Thu, 14 Aug 2008 17:30:02 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4133</guid>
      <author>Allen Walker</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by zhao lu @ Wed, 13 Aug 2008 16:22:10 -0000</title>
      <description>&lt;p&gt;First of all, congrats! &lt;br /&gt;I can resist asking you why.  But would you mind sharing with me, and the forum, how you manage to publish the feed?  The only thing I tried is to throw in this line:
 FacebookGiftsPublisher.deliver_facebook_gift_feed(fb_gift) rescue nil&lt;br /&gt;into the Controller&amp;#8217;s create method, right before a flash message and a redirect:
    flash[:notice] = &amp;#8220;Your gift has been sent.&amp;#8221; 
    redirect_to new_facebook_gift_path&lt;br /&gt;Since I see the flash message I assume that the deliver method is called.  And I think there&amp;#8217;s some magic for the deliver method to call facebook_gift_feed method defined in FacebookGiftsPublisher, which uses the feed template that I defined.  Am I missing something here?&lt;/p&gt;</description>
      <pubDate>Wed, 13 Aug 2008 16:22:10 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4112</guid>
      <author>zhao lu</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by Allen Walker @ Tue, 12 Aug 2008 08:50:07 -0000</title>
      <description>&lt;p&gt;Just to let you know, I was able to publish in my rails web code, just not thru script/console. Don&amp;#8217;t ask me why.&lt;/p&gt;</description>
      <pubDate>Tue, 12 Aug 2008 08:50:07 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4081</guid>
      <author>Allen Walker</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by zhao lu @ Tue, 12 Aug 2008 02:05:43 -0000</title>
      <description>&lt;p&gt;You are right, I&amp;#8217;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&amp;#8217;s 7pm pacific, monday).  We&amp;#8217;ll probably need to look deeper into the code to see why the out-of-date error is being thrown to us.  sigh.&lt;/p&gt;</description>
      <pubDate>Tue, 12 Aug 2008 02:05:43 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4073</guid>
      <author>zhao lu</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by Allen Walker @ Mon, 11 Aug 2008 18:50:21 -0000</title>
      <description>&lt;p&gt;Getting the same thing:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;script/console &lt;br /&gt;Loading development environment (Rails 2.1.0)&lt;br /&gt;&amp;gt;&amp;gt; ActivityPublisher.register_action&lt;br /&gt;NoMethodError: undefined method `small_story_template&amp;#8217; for #&amp;lt;activitypublisher:0xb722e798&gt;
        from /home/slick/meetingup/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:239:in `method_missing&amp;#8217;
        from /home/slick/meetingup/app/models/activity_publisher.rb:12:in `action_template&amp;#8217;
        from /home/slick/meetingup/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:369:in `send&amp;#8217;
        from /home/slick/meetingup/vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:369:in `method_missing&amp;#8217;
        from (irb):1&lt;br /&gt;&amp;gt;&amp;gt;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;And I defined the &amp;#8220;small_story_template&amp;#8221; &lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def action_template
  one_line_story_template "{&lt;strong&gt;actor&lt;/strong&gt;} scheduled at {&lt;strong&gt;location&lt;/strong&gt;} on {&lt;strong&gt;date&lt;/strong&gt;}." 
  small_story_template "{&lt;strong&gt;actor&lt;/strong&gt;}", "{&lt;strong&gt;actor&lt;/strong&gt;} scheduled at {&lt;strong&gt;location&lt;/strong&gt;} on {&lt;strong&gt;date&lt;/strong&gt;}." 
  full_story_template "{&lt;strong&gt;actor&lt;/strong&gt;} scheduled at {&lt;strong&gt;location&lt;/strong&gt;} on {&lt;strong&gt;date&lt;/strong&gt;}.", render(:partial =&amp;gt; "short_body")
end&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 11 Aug 2008 18:50:21 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4066</guid>
      <author>Allen Walker</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by zhao lu @ Fri, 08 Aug 2008 17:46:58 -0000</title>
      <description>&lt;p&gt;Sorry if I&amp;#8217;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.&lt;/p&gt;


	&lt;p&gt;def attack_feed_template
  one_line_story_template &amp;#8220;{&lt;strong&gt;actor&lt;/strong&gt;} {&lt;strong&gt;result&lt;/strong&gt;} {&lt;strong&gt;defender&lt;/strong&gt;}&amp;#8221; +
                           &amp;#8221; with a {&lt;strong&gt;move&lt;/strong&gt;}.&amp;#8221; 
  short_story_template &amp;#8220;{&lt;strong&gt;actor&lt;/strong&gt;} engaged in battle.&amp;#8221; ,
    &amp;#8220;{&lt;strong&gt;actor&lt;/strong&gt;} {&lt;strong&gt;result&lt;/strong&gt;} {&lt;strong&gt;defender&lt;/strong&gt;} with a {&lt;strong&gt;move&lt;/strong&gt;}.&amp;#8221; &lt;br /&gt;end&lt;/p&gt;</description>
      <pubDate>Fri, 08 Aug 2008 17:46:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:4008</guid>
      <author>zhao lu</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
    <item>
      <title>registering feed problem posted by louis @ Thu, 07 Aug 2008 21:22:31 -0000</title>
      <description>&lt;p&gt;page 114 of B7.0:&lt;/p&gt;


	&lt;p&gt;&amp;#8220;We&#8217;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.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;i get:&lt;/p&gt;


	&lt;p&gt;Facebooker::Session::MissingOrInvalidParameter: The small story template is a required parameter, and it must be of type string&lt;br /&gt;&amp;lt;snip /&gt;&lt;/p&gt;


	&lt;p&gt;in my AttackPublisher model, i have the method exactly as listed in the book:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def attack_feed_template
  one_line_story_template "{&lt;strong&gt;actor&lt;/strong&gt;} {&lt;strong&gt;result&lt;/strong&gt;} {&lt;strong&gt;defender&lt;/strong&gt;}" + " with a {&lt;strong&gt;move&lt;/strong&gt;}." 
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;i&amp;#8217;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 &amp;#8216;string&amp;#8217;. am i wrong?&lt;/p&gt;


	&lt;p&gt;i believe i have the latest version of facebooker (i script/plugin update&amp;#8217;ed).&lt;/p&gt;


	&lt;p&gt;any pointers are much appreciated.&lt;/p&gt;</description>
      <pubDate>Thu, 07 Aug 2008 21:22:31 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:781:3995</guid>
      <author>louis</author>
      <link>http://forums.pragprog.com/forums/59/topics/781</link>
    </item>
  </channel>
</rss>
