Take the 2-minute tour ×

I'm trying to build a feature into my framework wrapper that automates registering template bundles. I've gotten to the point where it seems like I can do so successfully using the Feed.registerTemplateBundle API method - I don't get an error, and I do get a template id back. However, the template doesn't show up in the "Registered Templates Console", and if I try to publish a story using the id, it gives me an "invalid template bundle id" error.

Any suggestions?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Turns out there were two problems:

  • I was erroneously double-json-encoding the short story template
  • Facebook was accepting the erroneously-formatting calls and returning an id, thus resulting in the creation of "phantom" template bundles that weren't showing up in their console.

I've fixed my code, and the bug has been reported (and I believe since fixed).

share|improve this answer

I had this problem in Facebook's official example application (TheRunAround)

it was registering template but when it tried to get an id it was using sprintf (like: sprintf('%d', ))

current template ID's are out of the 32bit range so it was returning wrong id.

May it be the cause?

share|improve this answer
I'm not using their example, or php for that matter, and I'm getting the return value as a 64-bit integer. –  Daniel Schaffer Apr 4 '09 at 19:11

Your Answer


