[SOLVED] Corona's Facebook API Broken (Build 2012.812-816)

Build 811 it’s the last one that works for me. When event.expiration (in 812) was added everything changed.

I’m getting this on Xcode’s Organizer:

May 11 23:17:25 iPad MyGame[10630] : -[IPhoneFBConnectDelegate dispatchLoginEvent:]: unrecognized selector sent to instance 0x2f2ad0

May 11 23:17:25 iPad UIKitApplication:com.—-.games.——[0xf1a5][10630] : Lua Runtime Error: lua_pcall failed with status: 6, error message is: NSInvalidArgumentException: -[IPhoneFBConnectDelegate dispatchLoginEvent:]: unrecognized selector sent to instance 0x2f2ad0

and the rest continues just like the first post.

Same code works for Build 811, not for 812 and forward. [import]uid: 10426 topic_id: 26315 reply_id: 107023[/import]

I’m having the same/similar issue with Daily Build 815. I updated mine from 810 to 815, and suddenly, the FB post routine that worked perfectly before stopped working properly:

  1. I deleted my game from the device and then installed the new build.

  2. Launched the game and tapped a button to make a FB post using facebook.request( “me/feed”, “POST”, attachment ). This worked perfectly fine.

  3. Played a while and made a new high score, and tapped the button to make a new FB post using facebook.request( “me/feed”, “POST”, attachment ) – and it went into never ending waiting phase. And the console shows lines after lines of unknown UIKitApplication. See below.

Naomi

May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] : Lua Runtime Error: lua_pcall failed with status: 6, error message is: NSInvalidArgumentException: -[IPhoneFBConnectDelegate dispatchLoginEvent:]: unrecognized selector sent to instance 0xf2de080
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] : (
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
0 CoreFoundation 0x3131b8a7 _exceptionPreprocess + 186
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
1 libobjc.A.dylib 0x31383259 objc_exception_throw + 32
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
2 CoreFoundation 0x3131ea9b -[NSObject doesNotRecognizeSelector:] + 174

[about 30 lines of the same thing and then…]

May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
31 UIKit 0x33b190e3 UIApplicationHandleEvent + 5826
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
32 GraphicsServices 0x3440922b PurpleEventCallback + 882
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
33 CoreFoundation 0x312ef523__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 38
May 16 11:28:19 unknown UIKitApplication:com.mywebsite.mygame[0x6b54][872] :
41 MyGame 0x0006fe44 MyGame + 11844

[import]uid: 67217 topic_id: 26315 reply_id: 107084[/import]

This definately seems like a bug and has been passed onto our engineering team to look into [import]uid: 84637 topic_id: 26315 reply_id: 107088[/import]

Thank you, Danny!

Naomi [import]uid: 67217 topic_id: 26315 reply_id: 107093[/import]

Seems to be solved: http://developer.anscamobile.com/release/2012/817 please report your experience. I’ll do it as soon as I can. Thanks Danny, Ansca. [import]uid: 10426 topic_id: 26315 reply_id: 107426[/import]

I updated mine to daily build 818, and the issue with the Facebook post I described above is gone.

Thanks, Ansca, for fixing this so quickly!

Naomi [import]uid: 67217 topic_id: 26315 reply_id: 107546[/import]

Updating to Build 2012.818 fixed the issue for me as well. Thanks for the help Danny! And the Ansca engineering team for the quick fix!

Paul [import]uid: 3027 topic_id: 26315 reply_id: 107553[/import]

Devs,

Does it mean that am unable to get the FB sample code from Asnca working at all when using the latest stable build 704b?

Is FB only working with the daily builds?
Thanks,
Rodrigo. [import]uid: 89165 topic_id: 26315 reply_id: 107569[/import]

Hey, Rodrigo, 704b shouldn’t be affected by this. The FB issue started with daily build 811 (or somewhere near it) and is fixed with daily build 817.

FYI, FB API implementation changed at daily build 707 to include Single Sign On feature. 704b still uses FB API implementation prior to Single Sign On, and it was working without any issue (and it should still be working fine.)

I hope this helps.

Naomi [import]uid: 67217 topic_id: 26315 reply_id: 107573[/import]

Dear Naomi ,

Sure it helps! :slight_smile:

I`ve asked because am close to “look into” FB things (implementation) and so I was curious if I still would use it even using the latest stable build (704b).

As I`ve took your time already, do you know if using the FB prior to the Single Sign On as am going to, would I be able to post “images” into the user FB page? :\
Really thanks my friend,
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 26315 reply_id: 107580[/import]

I’m still having this issue for some reason… Everything was working fine on 811, then I upgraded to the latest and I got this error… Only thing I’m doing is login, request(“me”), once that is done, request(“me/friends”)

The code is executed automatically without any user interaction. It works once, when the app logs in to facebook, but after that I’m getting errors… [import]uid: 14018 topic_id: 26315 reply_id: 107587[/import]

Mitaten,

If I understand you correctly, you are doing ‘facebook.request(“me”)’ and then subsequently calling ‘facebook.request(“me/friends”)’ immediately afterwards, correct?

You said that it works when the app first logs into Facebook. Try the facebook.login() command twice; once before each request. I haven’t looked into whether or not it’s a prerequisite to do this for each request, but it’s worth testing.

If you have any trouble, feel free to use any of the code above in my first post. It’s slightly modified from a Facebook tutorial for Corona; I don’t remember the name, but I’m sure you can find it with a Google search. The method of setting a local command variable and then calling facebook.login() seems to work properly.

Hope this helps! Please reply back and let us know if this fixes the problem.

Paul

[import]uid: 3027 topic_id: 26315 reply_id: 107603[/import]

@Naomi,

Thank you! :slight_smile:

FYI : CoronaSDK latest stable build (704b) does support the SSO for FB as can been seen below (Ansca`s statement distributed into FB sample code)

-- Update History:  
-- v1.1 Layout adapted for Android/iPad/iPhone4  
-- v1.2 Modified for new Facebook Connect API (from build #243)  
-- v1.3 Added buttons to: Post Message, Post Photo, Show Dialog, Logout  
-- v1.4 Added ...{"publish\_stream"} .. permissions setting to facebook.login() calls.  
-- v1.5 Added single sign-on support in build.settings (must replace XXXXXXXXX with valid facebook appId)  

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 26315 reply_id: 107605[/import]

Hey, Rodrigo, thanks for letting me know. I never looked at 704b update history. That’s really good to know. (I don’t plan on reverting back to 704b, but if I ever do, I now know FB related code should remain identical to the current version.)

Cheers,
Naomi [import]uid: 67217 topic_id: 26315 reply_id: 107616[/import]

Naomi,

You know you`re Welcome! .)
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 26315 reply_id: 107617[/import]

@Rodrigo, I like Single Sign On feature better than the prior FB API implementation. That said, I was able to post images to user FB wall with 704b.

@Mitaten, will you delete the app from your device completely, reinstall the new app build, and see if you still have the same issue?

Naomi

P.S. @Mitaten, just so you know, when I first tested FB post with daily build 818, a couple posts worked. And then, after that, even though my game says posts were successful, I could not see the posts on FB. Next I deleted the game from the device, and then installed it again, and then tested FB post routine again. This time it worked like charm. Several posts appeared on FB wall without any problem. I think I installed over the previous version first time around (i.e., I didn’t delete the game from the device, but rather, copied over it) – and perhaps there was a lingering issue somewhere that needed to be cleared out. Just guessing. It may not be the same with you, but might be worth clean slating and see if it fixes it for you.
[import]uid: 67217 topic_id: 26315 reply_id: 107604[/import]

I’m having similar problems on latest stable build (704b) when trying to send wall photo. On Android everything is ok.

My iOS console error:

: *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: -[__NSCFDictionary length]: unrecognized selector sent to instance 0x79111a0 [import]uid: 50988 topic_id: 26315 reply_id: 107627[/import]

Naomi, moflaherty, tried both your suggestions but neither worked… Guess ill just switch back to the old build that one works perfectly for some reason (811) [import]uid: 14018 topic_id: 26315 reply_id: 107642[/import]

@Mitaten, did you see any error messages on console?

Naomi [import]uid: 67217 topic_id: 26315 reply_id: 107694[/import]

Naomi, yeah I got the same error [import]uid: 14018 topic_id: 26315 reply_id: 108019[/import]