Facebook request failing on iOS

I have an application where my facebook request

facebook.request( “me/photos”,“GET”, {limit=500})

works on Android but won’t process on iOS.

Is there anything in the build settings i should look into?

 

In your iPhone block you need:

[coce]

            FacebookAppID = “12344563324232”,  – replace XXXXXXXXX with your facebook appId
            CFBundleURLTypes =
            {
                {
                    CFBundleURLSchemes =
                    {
                        “fb12344563324232”,    – replace XXXXXXXXX with your facebook appId
                        
                    }
                }
            },

[/code]

Sorry i should have been more specific. I do have that in the build settings

For the facebook get request is failing, however the post request works. Both get/post requests work on android. 

Are you getting any errors in your console log?

On the iOS simulator console log, I do see a couple of “assert failed” messages (however i’m not sure if they’re relevant).

What strikes me as interesting as far as my facebook request listener function is concerned, it doesn’t appear to be getting called (i have print debug messages indicating when facebookListener gets called)

Since you can post, that rules out developer portal issues.  Are you sure your facebook.request() is being called?

Yes it is in a listener block of code which is not surrounded by a conditional. You click the button and the request gets called.

local fBookGet = function(event)

  print(“fBookGet”)

  if( photo ) then 

    display.remove( photo )

  end

  if (fbPublish == 0 ) then

    fbPublish = 1

  end

  confirm.text = “”

– backButton.isVisible=true

  pickButton.isVisible=false

  fbButton.isVisible=false

  postButton.isVisible=true

  printsButton.isVisible=false

  reminderButton.isVisible=false

  servicesButton.isVisible=false

  buttonCancel.isVisible=true

  facebook.request( “me/photos”,“GET”, {limit=500})

  print (“post request”)

end

In your iPhone block you need:

[coce]

            FacebookAppID = “12344563324232”,  – replace XXXXXXXXX with your facebook appId
            CFBundleURLTypes =
            {
                {
                    CFBundleURLSchemes =
                    {
                        “fb12344563324232”,    – replace XXXXXXXXX with your facebook appId
                        
                    }
                }
            },

[/code]

Sorry i should have been more specific. I do have that in the build settings

For the facebook get request is failing, however the post request works. Both get/post requests work on android. 

Are you getting any errors in your console log?

On the iOS simulator console log, I do see a couple of “assert failed” messages (however i’m not sure if they’re relevant).

What strikes me as interesting as far as my facebook request listener function is concerned, it doesn’t appear to be getting called (i have print debug messages indicating when facebookListener gets called)

Since you can post, that rules out developer portal issues.  Are you sure your facebook.request() is being called?

Yes it is in a listener block of code which is not surrounded by a conditional. You click the button and the request gets called.

local fBookGet = function(event)

  print(“fBookGet”)

  if( photo ) then 

    display.remove( photo )

  end

  if (fbPublish == 0 ) then

    fbPublish = 1

  end

  confirm.text = “”

– backButton.isVisible=true

  pickButton.isVisible=false

  fbButton.isVisible=false

  postButton.isVisible=true

  printsButton.isVisible=false

  reminderButton.isVisible=false

  servicesButton.isVisible=false

  buttonCancel.isVisible=true

  facebook.request( “me/photos”,“GET”, {limit=500})

  print (“post request”)

end