6

I am building facebook iframe app. When I load this section of code on browser. In browsers console I seen the following to Errors FB.init has already been called - this could indicate a problem Invalid App Id: Must be a number or numeric string representing the application id.

Here is the sight of my code:

`script `<src="https://connect.facebook.net/en_US/all.js"> </script>`
FB.init({
      appId  : '<%= AppConfig.facebook_oauth[:application_id] %>',
      cookie : true,
      xfbml  : true
});

function send_invites(data,url) {

    FB.ui({
        method: 'send',
        name: data,
                picture: $('#group_pic').val(),
                link: url
    }, invites_callback);`

formatted coding

HackerGK
  • 360
  • 3
  • 15
Mehakpal Singh
  • 146
  • 1
  • 2
  • 11
  • did you added app id correctly? – HackerGK Oct 26 '13 at 13:52
  • Yes i have added it. Also I have checked the the value of the AppConfig.facebook_oauth[:application_id] variable by debugging the application. – Mehakpal Singh Nov 06 '13 at 05:56
  • Found solution? I'm having same problme, AppID is proper (generated by facebook) and it's not working. – Grzegorz Dec 18 '13 at 22:52
  • No not yet. Sorry for disappointing you.We've left the issue and found another way to implement it that's also not implemented by me. Please check in your code FB.init could already be initialized somewhere that's the only thing I can suggest you. – Mehakpal Singh Dec 19 '13 at 06:37
  • 2
    I implemented it this way (adding the parameter app_id) http://developwithguru.com/solve-invalid-app-id-must-be-a-number-or-numeric-string-representing-the-application-id/ and it worked – Bill'o Mar 12 '14 at 16:21

0 Answers0