Facebook API problem with posting

I am using the network sample code that came along with Corona. I added my appID and secret. I also followed the setup tutorial and add class name and key hash accordingly.

I started the sample app on my test device (nexus 5). It brings up the login screen and allowed me to log in. It recognized the app and asked for permission according to the guide. When I finished login in, I tried to post the generic “post picture” from that app. It keeps returning “post fail”. Any ideas? 

What are you seeing on your console log?  If you do not know how to see it, please read this tutorial:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Rob

I made it into a module that I can calling from a storyboard scene.

fbMod.fblogin()

and then another button

fbMod.fbPost()

Found something that is very confusing to me, since there were no comments on it in the sample code. 

The line: local statusMessage = createStatusMessage( "   Not connected  ", centerX, StatusMessageY )

When commented out, the application will not post to facebook. Why is that? I’m a little confused.

Without seeing the code, I’m going to guess that something later on depends on statusMessage existing and when you comment it out, it doesn’t get created.

Rob

When I uninstalled my facebook application, it worked. But when I put it back it, it stopped. Is there a step that I am missing?

If your facebook enabled app works when the native app isn’t there, but fails when it is, that points to a keyhash problem.  There should have been a message in the console log that said the hashkey is incorrect and suggested a correct one to use.  Please read this tutorial very carefully and it will help you solve your keystore problems.

http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

Rob

What are you seeing on your console log?  If you do not know how to see it, please read this tutorial:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Rob

I made it into a module that I can calling from a storyboard scene.

fbMod.fblogin()

and then another button

fbMod.fbPost()

Found something that is very confusing to me, since there were no comments on it in the sample code. 

The line: local statusMessage = createStatusMessage( "   Not connected  ", centerX, StatusMessageY )

When commented out, the application will not post to facebook. Why is that? I’m a little confused.

Without seeing the code, I’m going to guess that something later on depends on statusMessage existing and when you comment it out, it doesn’t get created.

Rob

When I uninstalled my facebook application, it worked. But when I put it back it, it stopped. Is there a step that I am missing?

If your facebook enabled app works when the native app isn’t there, but fails when it is, that points to a keyhash problem.  There should have been a message in the console log that said the hashkey is incorrect and suggested a correct one to use.  Please read this tutorial very carefully and it will help you solve your keystore problems.

http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

Rob