Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:33:44+00:00 2026-06-05T18:33:44+00:00

I am beginning Facebook App development and am following the Recipe Box App Tutorial

  • 0

I am beginning Facebook App development and am following the Recipe Box App Tutorial on Facebook.

https://developers.facebook.com/docs/opengraph/tutorial/

I am stuck under the heading “Publish an Action” where it says “Now click the cook button!” On my site, I click it and shortly after I get an error message that says “Error occurred”. I followed the steps I was given, except for the part where it says to click the “‘Get Code’ link next to your action. This contains curl code snippets that you can copy into terminal and run directly.” I didn’t know what to do with the curl code…the tutorial never really said to do anything with it.

Below is the code I’m using right now. I have a recipe.html file and an objectpage.html, which is where I click the cook button and get the error. Thanks in advance for any help you can give me!

recipe.html:

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
      xmlns:fb="https://www.facebook.com/2008/fbml"> 
<head>
  <title>OG Tutorial App</title>
</head>
<body>
  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : '266155930158877', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
    };

    // Load the SDK Asynchronously
    (function(d){
      var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
      js = d.createElement('script'); js.id = id; js.async = true;
      js.src = "//connect.facebook.net/en_US/all.js";
      d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
  </script>

  <fb:login-button show-faces="true" width="200" max-rows="1" scope="publish_actions">
  </fb:login-button>

  <h3>Stuffed Cookies</h3>
  <p>
    <img title="Stuffed Cookies" 
         src="http://fbwerks.com:8000/zhen/cookie.jpg" 
         width="550"/>
  </p>
</body>
</html>

objectpage.html

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
      xmlns:fb="https://www.facebook.com/2008/fbml"> 
<head prefix="og: http://ogp.me/ns# rk_recipebox: 
                  http://ogp.me/ns/apps/rk_recipebox#">
  <title>OG Tutorial App</title>
  <meta property="fb:app_id" content="266155930158877" /> 
  <meta property="og:type" content="rk_recipebox:recipe" /> 
  <meta property="og:title" content="Stuffed Cookies" /> 
  <meta property="og:image" content="http://fbwerks.com:8000/zhen/cookie.jpg" /> 
  <meta property="og:description" content="The Turducken of Cookies" /> 
  <meta property="og:url" content="http://fbwerks.com:8000/zhen/cookie.html">

  <script type="text/javascript">
  function postCook()
  {
      FB.api(
        '/me/rk_recipebox:cook',
        'post',
        { recipe: 'http://fbwerks.com:8000/zhen/cookie.html' },
        function(response) {
           if (!response || response.error) {
              alert('Error occured');
           } else {
              alert('Cook was successful! Action ID: ' + response.id);
           }
        });
  }
  </script>
</head>
<body>
  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : '266155930158877', // App ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
    };

    // Load the SDK Asynchronously
    (function(d){
      var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
      js = d.createElement('script'); js.id = id; js.async = true;
      js.src = "//connect.facebook.net/en_US/all.js";
      d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
  </script>

  <h3>Stuffed Cookies</h3>
  <p>
    <img title="Stuffed Cookies" 
         src="http://fbwerks.com:8000/zhen/cookie.jpg" 
         width="550"/>
  </p>

  <br>
  <form>
    <input type="button" value="Cook" onclick="postCook()" />
  </form>
</body>
</html>

Page is located here:

http://glutendatabase.com/objectpage.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:33:46+00:00Added an answer on June 5, 2026 at 6:33 pm

    In your objectpage.html file replace the postCook() function with this one. This will at least tell you what your error is.

    My guess is you’re still trying to POST the example URL given, not they URL of your webpage (See line 6 below). If your server is LOCALHOST, that will also throw an error. You need to be on a named server.

    function postCook()
    {
      FB.api(
        '/me/rk_recipebox:cook',
        'post',
        { recipe: 'http://YOURSERVER/objectpage.html' },
        function(response) {
           if (!response) {
              alert('Error occurred : No Response');
           } else if (response.error) {
              alert('Error occurred : ' + response.error);
           } else {
              alert('Cook was successful! Action ID: ' + response.id);
           }
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement an android app requires facebook login in the beginning.
I have the following Facebook iframe as part of the template: <iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot;
Code in the book Beginning iPhone Development (by Dave Mark & Jeff LaMarche) assigns
I am beginning to work on my first OpenGL iPhone app, but I've hit
I am in early beginning of learning and deploying Win App using C#, Now
I am just beginning to get into desktop application development, and have chosen C#
I'm interested in beginning to write facebook games. A quick google search for technologies
We have been getting a new error in our Android app since beginning of
I'm developing a web app where users enter their facebook page url either in
I have the Facebook iOS SDK set up in my app. However, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.