Hello,
I use very often in my first Connect app the function that register template
(FooPublisher.register_boo)
" # # Before using, you must register your template by calling
register. For this example
# # You would call TestPublisher.register_publish_action" (for the
doc)
But I ended up with a lot of registered templates for my application. (F.B
limit is 100)
I have seen for the code source that a hash is calculated from the stories
templates and allow you to simply call create or deliver without having to
worry about registering the template
I just mention the issue here because the doc is not quite clear about this
wonderful feature !
Thanks,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/facebooker-talk/attachments/20081209/52297548/attachment.html>
After registering a template, Facebooker save the template id returned
by facebook with the template name (the methode name you defined in
the publisher).
To avoid multiple template registering, I do something like :
FacebookPublisher.register_feed_item unless
Facebooker
::Rails::Publisher::FacebookTemplate.find_by_template_name("feed_item")
HTH,
--
St?phane Akkaoui
http://imeuble.info [fr]
http://sociabliz.com [en/fr]
Le 9 d?c. 08 ? 18:19, Pierre Valade a ?crit :
> Hello,
>
> I use very often in my first Connect app the function that register
> template (FooPublisher.register_boo)
>
> " # # Before using, you must register your template by
> calling register. For this example
> # # You would call
> TestPublisher.register_publish_action" (for the doc)
>
> But I ended up with a lot of registered templates for my
> application. (F.B limit is 100)
>
> I have seen for the code source that a hash is calculated from the
> stories templates and allow you to simply call create or deliver
> without having to worry about registering the template
>
> I just mention the issue here because the doc is not quite clear
> about this wonderful feature !
>
> Thanks,
>
> Pierre
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
Yes but the last version of facebooker from Github does even a better job by
registering the template only when needed (when the hash has changed. So
calling register_.. is not necessary unless you change something that is not
included in the hash''s calculation ....
For example be aware that action_links are not included in the hash :
def hashed_content(klass, method)
publisher = setup_publisher(klass,method)
Digest::MD5.hexdigest [publisher.one_line_story_templates,
publisher.short_story_templates, publisher.full_story_template].to_json
end
Pierre
On Tue, Dec 9, 2008 at 6:36 PM, St?phane Akkaoui <
stephane.akkaoui at imeuble.info> wrote:
> After registering a template, Facebooker save the template id returned by
> facebook with the template name (the methode name you defined in the
> publisher).
> To avoid multiple template registering, I do something like :
>
> FacebookPublisher.register_feed_item unless
>
Facebooker::Rails::Publisher::FacebookTemplate.find_by_template_name("feed_item")
>
> HTH,
>
> --
> St?phane Akkaoui
> http://imeuble.info [fr]
> http://sociabliz.com [en/fr]
>
> Le 9 d?c. 08 ? 18:19, Pierre Valade a ?crit :
>
> Hello,
>>
>> I use very often in my first Connect app the function that register
>> template (FooPublisher.register_boo)
>>
>> " # # Before using, you must register your template by
calling
>> register. For this example
>> # # You would call TestPublisher.register_publish_action"
(for the
>> doc)
>>
>> But I ended up with a lot of registered templates for my application.
(F.B
>> limit is 100)
>>
>> I have seen for the code source that a hash is calculated from the
stories
>> templates and allow you to simply call create or deliver without having
to
>> worry about registering the template
>>
>> I just mention the issue here because the doc is not quite clear about
>> this wonderful feature !
>>
>> Thanks,
>>
>> Pierre
>> _______________________________________________
>> Facebooker-talk mailing list
>> Facebooker-talk at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/facebooker-talk
>>
>
>
--
Pierre Valade
+33.6.89.04.15.30
www.tiiptop.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/facebooker-talk/attachments/20081209/3afc790d/attachment-0001.html>