[SOLVED] Facebook App conflicting with new Facebook API?

I am trying out the new Facebook stuff on my iPad, so I just basically copied all of the code from Jon Beebe’s recent blog post and the only thing I changed was the image file to something I had.

When I tested it on the iPad it would never post.

Every time I tried doing a post the actual Facebook app would flip into view, show an empty Facebook window in the foreground and then immediately flip back to my app, then I would get the popup saying the photo was uploaded. However, when I go to Facebook later, there are no posts.

I uninstalled the Facebook app. Now when I do the post, it opens Safari, asks me if I want to allow permissions for the app. I accept and a little later I see a post on Facebook! everything seems to be working.

I then reinstalled the Facebook app. Same problems as before.

Anybody else getting this?

[import]uid: 94868 topic_id: 19256 reply_id: 319256[/import]

Make sure you on Facebook’s dev portal (https://developers.facebook.com/apps), that your app is setup to be deployed as a native iOS app. And more importantly, that the ‘iOS Bundle ID’ field matches the bundle id of your app.

We hit the empty Facebook window as well and setting the bundle id seemed to fix this.

(BTW, you’ll need to fill out the ‘iPhone App Store ID’ field as well. If your app hasn’t shipped yet, just grab any valid iTunes app id — easiest way is to go to our showcase and click one of the “Available on iTunes” buttons; just be sure to change it to your app’s id once it ships!) [import]uid: 26 topic_id: 19256 reply_id: 74355[/import]

That did it!

Just made sure my apple appID was using the same bundleID that facebook had.

Everything works great now!

Thanks! [import]uid: 94868 topic_id: 19256 reply_id: 74399[/import]

For anyone else who stumbles upon this thread, the blog post has been updated with the above information:

http://blog.anscamobile.com/2011/12/uploading-photos-to-facebook-in-corona/ [import]uid: 52430 topic_id: 19256 reply_id: 74463[/import]

Question for you.

Do you know why do we need to setup a IOS bundle ID if we may only be doing android? I mean I’m not really, we do plan on doing ios as well but just for basic testing I am using my cell phone, so why ?

Thanks

Larry
http://www.DoubleSlashDesign.com
[import]uid: 11860 topic_id: 19256 reply_id: 77671[/import]

I have a similar issue but not exactly the same. My app works perfectly in ios simulator, but there is no facebook app in that. On my ipad hardware when I go to login it opens up the ipad facebook app, I see popup that’s empty for about 3 seconds, then it goes away and leaves me inside the facebook app.

I have a vaild ID set as well as bundle.

When I removed the facebook app from the iPad I got the web pop up like I did on the simulator, only when I approve the permissions I get a new popup from safari “Cannot Open Page” “Safari can’t open the page because the address is invalid”

I checked my CFBundleURLSchemes section and I have my key in there with the fb prefix.

Always frustrating when it works on xcode simulator and not hardware. no usefull error messages.

update:
its working on the ipad now in the web mode atleast
I changed was the auth comments field in facebook, not sure if that forces and update that shook something into working on what.
I also made a fresh build but no code changes.

Reloading the facebook app now to see if that works.
Can’t find out since my app dosn’t have a logout feature and its already signed on. Oh well.
Alteast it’s working, Just wish I knew why. [import]uid: 110373 topic_id: 19256 reply_id: 79391[/import]

In an attempt to confirm what the problem was, did you try putting that “auth comments”(?) field back to the way it was and see if it reverts back to the old behavior?

And if you don’t have a logout feature, try logging out of the facebook app and also remove your app from your Facebook Permissions; Facebook Page->Account Settings->Apps. I think that would kinda reset your whole app’s facebook side of things back to the beginning. Also maybe shut down the facebook app too (double-tapping the iPad button brings up this functionality). Then test your app’s facebook functionality again. [import]uid: 94868 topic_id: 19256 reply_id: 79479[/import]

I’m having some related issues with Facebook. Originally, I had the same problem of bouncing into Facebook for a couple seconds and then back to my own app. Now, I get the proper authorization screens, the app gets authorized successfully, but I never get bounced back to my own app. Any ideas?

UPDATE: It seems there was a problem with the App ID I was using, maybe because it was not on my account. In any case, switching to a valid App ID on my own account seems to have done the trick. [import]uid: 3671 topic_id: 19256 reply_id: 80717[/import]

I;m having the same problem as @bred.herman - I see a popup for 3 seconds but it never completes the posting. Also the Safari route ends in a ‘cannot find the page’ error.

My App ID is correct - I have set up the App in iTunes connect.
Am I right in thinking the Bundle ID is com.mycompant.myappname? That’s what I’m using.
I have changed the Auth Dialogue but no luck.

Is there a different approach when testing an App with a development profile to a distribution one (I’m using dev at the moment )? Is there a sandbox mode for the FB app?

I am at a loss to know what to try next! [import]uid: 61520 topic_id: 19256 reply_id: 82909[/import]

The bundleID is whatever you set up in iTunes Connect. If you go there and check your app, it should list it there. But typically if you have been following everyone else, it is “com.mycompany.myappname”.

Hopefully that helps? [import]uid: 94868 topic_id: 19256 reply_id: 82935[/import]

Super new at Corona and trying to get the FB example under Networking working.

I have an App ID assigned from Facebook, Correct Bundle ID from Apple but I just haven’t gone as far as generating an app id thru iTunes connect.

Do I actually need to create an app id thru iTunes connect on my account to get this to work… just trying to test. [import]uid: 107466 topic_id: 19256 reply_id: 83160[/import]

@anthony1
You need a bundleID that’s yours and an AppID that is already on sale even if its someone else’s for the Facebook side to accept it. Just change it to your appID before you publish to apple. [import]uid: 110373 topic_id: 19256 reply_id: 83162[/import]

@brad thanks for the help!

I am getting an API error code 100 now…

API Error Description: Invalid parameter
Error Message: requires valid redirect URI

Any ideas?

app domain is set to myco.com

Using Native OS and Mobile web

Mobile web URL is http://www.myco.com

Could anyone possibly post how to setup the app page for facebook… I would actually be happy to show an example screenshot once I get this configured properly as a matter of fact… I think that could be really helpful. [import]uid: 107466 topic_id: 19256 reply_id: 86157[/import]

As far as the Facebook settings, this is what I did and it seems to work. But you do need an app in iTunes Connect to get a valid apple ID (and it is easy to do and you can delete it later if you want).

After you have added the new app from the facebook developer these were the settings.

Select the “Native iOS App” section

  • iOS Bundle ID - for this go to iTunes Connect, Manage Apps, then select your app. On the top of this screen you should see the Bundle ID and Apple ID.
  • iPhone App Store ID - Apple ID
  • iPad App Store ID - Apple ID (universal build uses the same)
  • Configured for iOS SO - enabled
  • ios native deep linking - disabled
  • URL Scheme Suffix - (left blank)

Select “Native Android App” (if you are using android)

I did not use any other settings on the facebook app page.

hope that helps! [import]uid: 94868 topic_id: 19256 reply_id: 86256[/import]

@Screaming Leaf… thanks for the help.

Here is what I am trying to do.

Take a picture with the iPhone camera, save that picture locally then post to a friends wall from the saved picture.

I did like you said above and I set things up that way…

I have tried a few different builds to achieve this.

So with 2011.707 I get the following (using this build because this is what Jon Beebe uses in his post)

So I have tested using the code from here http://blog.anscamobile.com/2011/12/uploading-photos-to-facebook-in-corona/ and I place my image in my resources directory when I build.

When I run without the native FB app on my phone I get the FB 100 error… when I run with the FB app on my phone I don’t get any error but the pic never posts.

Any thoughts?

I can send you the code should you be interested in helping this newb :slight_smile:

Tony [import]uid: 107466 topic_id: 19256 reply_id: 86721[/import]

sure I’ll take a look (no promises I can get it to work though, since I am still learning this stuff too). you can send it to me at:

adam [at] screamingleaf [dot] com
[import]uid: 94868 topic_id: 19256 reply_id: 86755[/import]

@screaming leaf
I am just now getting back to my pet project here… I got around the network error by removing the app from my facebook account and then re running the app and allowing it to post. I think it was a caching issue.

What I cannot get my app to do is to post an image from my Documents directory. I can post an image to facebook from an image I include in my Resource directory on build just not one I save to ‘Documents’ from the camera (iphone4).

Anyone here experience this as well? [import]uid: 107466 topic_id: 19256 reply_id: 89378[/import]

Hi,

I got problem posting image to FB, too. I set everything just as Screaming Leaf said in the FB App side. For the first time, it brings up webpopup asking to login and then ask for permission and after awhile, i can have my image uploaded to FB.

When i tried to upload it for second time, nothing happened. No webpopup or anything appeared.

Anyone has the same problem? Please provide some ideas. Thanks… [import]uid: 81883 topic_id: 19256 reply_id: 108233[/import]

me also want to post on facebook but Facebook sample code didn’t work with me [import]uid: 160777 topic_id: 19256 reply_id: 117593[/import]

this code didn’t work with me any help??? [import]uid: 160777 topic_id: 19256 reply_id: 117596[/import]