facebookfacebook-credits

facebook credits help


can anyone please give me a simple code to do this:

a user purchases my item via fb credits. its working fine. I just want that what item its purchasing say "abc123". I want when he goes thorough entire purchase process I can get that value "abc123" in the JS at the callback part..

    var obj = {
            method: 'pay',
            order_info: order_info,
            purchase_type: 'item'
          };

          FB.ui(obj, callback);

    var callback = function(data) {

I WANT TO GET IT "abc123" HERE....

i have gone through the forum links some said use the "data" key but am unable to use it..

I would highly appreciate if someone please write in the additional lines that i need to put, also where to put in the callback php file..


Solution

  • I have a created a sample application which demonstrates how the frontend and backend API calls should work. It provides code to get you up and running after you input your application's information needed by the API. The sample code and documentation can be found in the Facebook Credits Tutorial.