Facebook login on iOs - returns 'loginFailed'

So in terms of usability, if the user earns a badge, they will automatically see the login popup and go through that process. Then if they want to share their badge, they can do so on a second button click. I guess what I was hoping to do was have everything kick off with one single button click. I suppose I could chain the events somehow?

hi, I actually just now put in a test button that simply has a login action and still get ‘loginFailed’ coming back from FB. Oy, gevalt!

 local function listener(event)

    print(“registering FB”)

    print(event.type,event.phase)

  end

  local function onClk()

    print(“btn Clicked”)

    facebook.login(“577131645672800”, listener)

  end

  btnTest = widget.newButton

        {

          label = “test”,

          id = data,

          onRelease = onClk,

          defaultFile = “widget_ios/button/facebookBtn/btn.png”,

          overFile = “widget_ios/button/facebookBtn/btn.png”,

          width=150,

          height=30,

          font = “HelveticaNeue-Light”,

          labelColor = {

            default = { 255,255,255 },

            over = { 255,255,255 },

          }

        }

        btnTest.x = 100

        btnTest.y = 100

        self.view:insert(btnTest)

What does http://docs.coronalabs.com/api/library/facebook/accessDenied.html return?

This refers to the iOS integrated facebook app settings.

hi, I get the popup, Facebook access denied. And I tested my Gabbler integration, it’s not working any more either, OMG! Here’s what console is telling me:

client ‘com.facebook.Facebook’ stopping significant location changes

Dec 13 09:43:17 Jens-iPhone backboardd[28] <Warning>: Facebook[3438]: Could not stat /private/var/mobile/Applications/9AC3B1AC-BA02-4A28-BC1D-8D4760D91EF6/tmp/etilqs_xbSMoog1BPScqtI: No such file or directory

Dec 13 09:43:17 Jens-iPhone backboardd[28] <Warning>: Facebook[3438]: Could not stat /private/var/mobile/Applications/9AC3B1AC-BA02-4A28-BC1D-8D4760D91EF6/tmp/etilqs_mLQffGi8ffQXByi: No such file or directory

Help, FB is throwing up in my console!

I think I’m going to need a simple sample project that demonstrates this issue along which the reproduction steps.

hi, sorry to be so needy. Most of the time I can sort things myself, this is so mysterious.

Here’s a link to a sample project

https://www.dropbox.com/sh/zhspx7u5awa0cc9/rBToSSfwbY

FWIW I just built the sample FB Connect project to my phone and with the SevenMinutes app id it does work fine. So my app appears to be properly set up in Facebook. I wonder if it’s an issue with Carrot at this point.

J

It seems to me that if you have never authorized your app before, then this line:

if facebook.accessDenied then

will always be true.  Now I can’t really test this since I can’t build against the bundle ID you have setup.   If you do the force login followed by the regular login, do  you get the error?

Rob

I’m having the same issue.  Using the sample app with my appId it works fine, but not using my app.  Have you figured this out?

hi, I gave it up and moved over to the Social Plugin. That makes posting to Facebook and Twitter easy, if slightly less streamlined. At least it works. However the Facebook piece of it doesn’t yet work on Android…going to revisit this next year :slight_smile:

best,

Jen

Hi @nahmeenstudios, can you tell me more about your situation:

What build of Corona are you using?

What device are you testing on?

Have you looked in your device’s console log to look for errors?  (See this tutorial if you need help finding the log: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/)

Have you followed the advice in this tutorial? http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

Can you post  your code that you are trying to use to login to facebook?

Thanks

Rob

I am experiencing the same problem.

The same code works on iPad 5.1, but returns loginFailed on iphone with iOS 6.1

Using the latest public release.

You may be running into an issue with regards to the built in iOS support for facebook logins.  Can you go into the device’s “Settings” app and drill into the Facebook entry and make sure the login there is valid?  Make sure your app has not been denied access?

Are there messages in your device’s console log?

See my follow up here:

http://forums.coronalabs.com/topic/46109-facebookaccessdenied-does-not-work-on-ios/#entry242655

Summary:

The problem was 

 facebook.accessDenied  

which was always true

I am experiencing the same problem.

The same code works on iPad 5.1, but returns loginFailed on iphone with iOS 6.1

Using the latest public release.

You may be running into an issue with regards to the built in iOS support for facebook logins.  Can you go into the device’s “Settings” app and drill into the Facebook entry and make sure the login there is valid?  Make sure your app has not been denied access?

Are there messages in your device’s console log?

See my follow up here:

http://forums.coronalabs.com/topic/46109-facebookaccessdenied-does-not-work-on-ios/#entry242655

Summary:

The problem was 

 facebook.accessDenied  

which was always true