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 5964483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:26:26+00:00 2026-05-22T19:26:26+00:00

I am using facebook credits api and using its pay method, following is my

  • 0

I am using facebook credits api and using its pay method, following is my code:

 <script type="text/javascript">
 window.fbAsyncInit = function() {
    FB.init({
      'appId'   : '<?php echo $app_id; ?>',
      'session' : <?php echo json_encode($session); ?>, // don't refetch the session when PHP already has it 
      'status'  : true, // check login status
      'cookie'  : true, // enable cookies to allow the server to access the session
      'xfbml'   : true // parse XFBML
    });


    // whenever the user logs in, we refresh the page
    FB.Event.subscribe('auth.login', function() {
      window.location.reload();
    });
    FB.Canvas.setAutoResize();
 };

  (function() {
   FB_RequireFeatures(["CanvasUtil"], function() {
            FB.CanvasClient.scrollTo(0, 0);
            window.FB = null;

            var e = document.createElement('script');
            e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
            e.async = true;
            document.getElementById('fb-root').appendChild(e);
        });
  }());
</script>
    <script type="text/javascript">
        function placeOrder() {

  var order_info = { "title":"Music Mood Points",
                     "description":"Get Music Mood Points to purchase avatars",
                     "price":"10",
                     "product_url":"abc"
                   };

  // calling the API ...
  var obj = {
    method: 'pay',
    order_info: order_info,
    purchase_type: 'item'
  };

  FB.ui(obj, callback);
}

var callback = function(data) {
  if (data['order_id']) {
    writeback("Transaction Completed! </br></br>"
    + "Data returned from Facebook: </br>"
    + "<b>Order ID: </b>" + data['order_id'] + "</br>"
    + "<b>Status: </b>" + data['status']);
  } else if (data['error_code']) {
    writeback("Transaction Failed! </br></br>"
    + "Error message returned from Facebook:</br>"
    + data['error_message']);
  } else {
    writeback("Transaction failed!");
  }
};
  </script>
function writeback(str) {
  $('.get_points').html(str);
}
   </script>

And here is button to click:

 <input type="button" onclick="placeOrder();" value="GET More POINTS NOW" />

So when I click the button , it says in a facebook popup: Your application is not responding correctly.

So is there some thing missing in code or some thing that need to specify from application settings. Do any one have any idea. Any little thing you can tell is appreciated.

thanks in advance

  • 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-05-22T19:26:28+00:00Added an answer on May 22, 2026 at 7:26 pm

    When you place an order Facebook is making an backend call to your server (to the path set in the application setting page (under credit section).

    That error means your application is not replying correctly to that initial call (there are actually two that will take place)

    See http://developers.facebook.com/docs/creditsapi/
    for more including sample code for your backend.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Facebook API v5.3 BETA, although have tried the following using v5.2.1 Stable.
I am using Facebook graph API and getting its result in json format.. I
I am using Facebook API how i can get userid in facebook from its
i am using facebook api in my android project {error:{type:OAuthException,message:Error validating access token: Session
Using the Facebook API, is there a way of getting a friend's phone/cell number?
Using Facebook Search API, I got an response like: data : [ { created_time
I am using the facebook api for ios and i am using facebook dialogs
I am using Facebook graph API to upload photo to the Facebook and on
I am developing app using facebook API. When I push 'login' button from my
I am using Facebook's API to create a new album with a picture from

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.