Facebook API and Open Graph v2 issues

I need to make sure this is a problem with our Facebook Sample app.  I know @cjorgens79 said it didn’t work with the sample app, but I’m not clear if this was just the error he was seeing about unrecognized selector or this permission problem.  So can someone with the permission problem confirm this is an issue with our sample app for us?

Please make sure you are testing the SampleCode/Networking/Facebook sample app, not the scrumpitious or social networking apps.

Thanks

Rob

The sample app has the permission problem, when you try to request extended permissions by doing a second login attempt you get the unrecognized selector issue and hence no extended permissions.

*but only with user accounts that haven’t been previously authorized with the app*

@cjorgens79, did you try creating a test Facebook app, creating test users under that app, and then logging in with them? I was testing this yesterday and this morning, and it allowed me all permissions I requested.

@Panc - I ran into the problem in my application, so i then tried the corona facebook sample application and ran into the same problem there too. 

What was your process for requesting extended permissions and what permissions did you request with new test users through a corona app?

Also have you tried creating brand new test users in the last couple of days and logging in and requesting extended permissions with your app? Older test users i had work fine, new ones dont. 

I think my workflow is a bit different than most, in that I have been taking incremental steps to have a fully-functional Facebook implementation, because this stuff is so foreign to me. To confirm, I didn’t start on this until the 3rd, so all users, apps and steps taken have been performed since then.

::gets on soapbox:: I would prefer to not even have to worry about Facebook, as I don’t personally have a page, and I think the market that uses it wouldn’t be interested in my products. But, Facebook is a reality we all have to live with, so I need to get my skills up. ::steps down from soapbox::

So, to test out the functionality, I took the following steps:

  1. Created app in facebook developer portal

  2. Created test app under this app

  3. In the test app, under settings, clicked the Add Platform option

  4. Here, input the Package Name for my app, and the Class Name ( com.ansca.corona.CoronaActivity)

  5. Checked on Single Signon and Enabled Deep Linking

  6. Go to Roles, and added test users.

6a. Key hashes are not relevant here. I found this out as I was inputting just random text and all logins worked fine, without errors in the adb logcat.

  1. Used sample Facebook code to log in with a test user.

  2. Checked test user’s Facebook wall, and saw post located there.

This, again, is just for control purposes, to confirm that extended permissions do indeed work, at least on some level. I can knock up an Android build for you to test if you would like (iOS can happen, but not as quickly, as my Macbook is tucked away right now). Let me know.

Sorry I didn’t mention this earlier, but all my testing on this issue so far has been with iOS. The error in particular looks like an iOS error, so probably an issue with the facebook iOS SDK integration or something. From what you have said, by the sounds of it Android might be working ok, I will have to give it a try when I get a chance. 

Ditto @cjorgens79 - I’m beginning to suspect that this might be an issue with Corona’s implementation of the Facebook SDK for iOS - I’m only working on iOS and my experience does not mirror Panc’s at all. @Rob, can you ask engineering to see if there might be some issue on the iOS/Corona side that could be causing this error?

In my own efforts to isolate the cause of the bug, I created a brand new Facebook app because they have indicated that apps created before the roll-out of Graph 2.0 could behave differently than those created after. No dice - I still get the same errors. More and more this points to something in the Corona SDK implementation of Facebook that isn’t playing nice with Graph 2.0…

Well, the thing about it, is that I haven’t started the “Submit and Review” process, so I can’t even make my app public-facing to test whether or not new people can get permissions. 

Maybe I’m missing the boat here (which wouldn’t be the first time) but it seems like Facebook went ahead and locked everything down, permissions-wise, very recently. I believe that Facebook may be referring to this “test user” process as the way that the app’s DEVELOPERS can gain access to extended permissions, rather than in the public-facing method that you are used to.

Very annoying at the least, poorly documented and unnecessarily restrictive at worst. I’m becoming more and more anti as this process goes on. Every other social media option is represented in my app at this point, except for Facebook, and the other ones are working like gangbusters. 

Images-article-2012-09-16-channel-ten-gl

Enough bellyaching. When I get a chance tonight, I’ll pull out the Mac and do some iOS testing. I can’t imagine this is platform-specific, but I’m no Conan the Librarian, so what do I know. I’ll report back with my findings. If anyone wants me to test something on Android, or test the sample app I created, let me know and I can provide that. 

Hi Panc,

Thanks for all your efforts in sussing this out. Unfortunately, I created a test user and got the same issue on my iOS app - I can log in using the test user, I can get the “public_profile” permission…anything else, specifically “read_stream” or “publish_actions”: no dice.

I may build my app for one of my Android devices tonight to try and see if the same issue presents itself there. Sadly, my app really needs Facebook integration: it’s central to how it will work, so there’s no getting around it. Sigh.

Hopefully we’ll get to the bottom of this before too long so we can all move on. :slight_smile:

Thanks,

Jason

p.s. saw on your Facebook profile (from when you subscribed to my bug) that you’re based in West Chester, PA? I grew up in Broomall, and have several family members living in West Chester. Small world!

Oh man, that was supposed to read “based in the center of the Earth.” I better edit. Jokes notwithstanding, it’s a great place to be. Tree-lined roads and a chickencoop in every yard.

Let me ask you though: when you created your test user, did you create a “test app”, and then create the test user under that app? I know it might not matter at all, but I’m really worried, from the comments in the bugpost, that the analyst is going to come back and say, you need to get your app approved and then the seas will part and everything will work normally.

I’m in the process of firing up the Mac; I’m going to build and update all as events warrant.

<Error>: +[FBSession isPublishPermission:]: unrecognized selector sent to class 0x38a2ac

That error should be fixed.

@dchan: agreed! Trouble is, I’m not sure who needs to fix it…is the issue one with the Facebook SDK, or with Corona’s implementation of it?

Below is the latest word from FB regarding my bug report. At this point, they seem willing to help but I’m afraid I’m not going to be much use to them. Any chance a friendly neighborhood Corona Labs staffer is willing to jump into the conversation at https://developers.facebook.com/bugs/649529008416388/ ?

LATEST FROM FACEBOOK:
Unfortunately I don’t have a test harness setup to test Corona - if there’s a problem with our SDK or API we’ll need instructions to reproduce that issue using our SDK or calls to our API - do you or any of the other reporters have steps we can follow to see the error which can rule out any problem with Corona’s Facebook integration as being the source of the issue?

I meant that issue has been fixed so please try building with the plugin again.

@dchan, great thanks, i will give it a try and report back as soon as i get home tonight

@dchan,

Do to some unrelated issue that cropped along the way I’m stuck with build # 2275. In order to get the fixed plugin I don’t need to go to a recent daily right? The plugin is hosted on the build server independent of the daily builds right? So how do we ensure we get the updated plugin? They are cached locally right?

Thanks for your help.

@dchan. Duh, Jason. Sorry for mis-reading your post and thanks for the help! I’ll try tonight and report back.

Kerem, if you’re building with the plugin now, then you should get the latest plugin the next time you build.

Rob

Hi Rob, thanks for your help. Just to make sure I get this right, are you saying each time I build CL checks the plugin version and gives me the latest and greatest? If so then all should be fine. I just want to make sure I don’t get stuck with the older plugin because I’m waiting on an older daily build. Thanks for your clarification.

That did the trick for me - thanks, dchan, Rob, and everybody for getting such a quick resolution!

Yes, with a few caveats like some plugins require minimum build numbers, etc.