1

Sencha Touch 2 has a sample app called 'Jog With Friends', which is helpful to implement mobile authentication for FB.

In auth portions of the sample app, there is reference to the FB appId as follows:

    ...
    FB.init({
        appId  : MyApp.app.facebookAppId,
        cookie : true
    });
    ...

I presume this means there should be a file as such

/MyApp/app/facebookAppId

containing my FB App ID number.

But I have no idea what extension this file should have, and in which format the App ID number should be stored in this file.

Any idea how this is done?

Evan Trimboli
  • 29,900
  • 6
  • 45
  • 66
pepe
  • 9,799
  • 25
  • 110
  • 188

1 Answers1

3

Go to the Facebook Developer site and create an application: http://developers.facebook.com/apps - at the end of the simple process you'll see the App ID.

Either hardcode that in here, or, as seems likely, set it as the facebookAppId property of the app object in Sencha Touch.

In fact, this is set in the app.js file that is sitting in the root of that example's folder:

launch: function() {
    this.facebookAppId = ''; // <-- add it here
    if (this.facebookAppId === '') {
    ...
James Pearce
  • 2,332
  • 15
  • 14
  • yes I already have an app id - do you have an example of how to set it as you recommend? – pepe Sep 27 '12 at 01:14