Help with Facebook post

Hi

I’ve been struggling with the Facebook intergration. The problem is I’m trying to do Facebook posting but everytime I build the app nothing happens. I even use the Facebook sample and nothing comes up when I click on the buttons. I have everything setup properly in Facebook and in build.settings. I’m using Build 1034. Why am I not getting any Facebook signal when I click on the buttons in the Facebook sample App? What could I be missing?

Thanks

Did you setup your app on facebook itself?

Yes I did setup my app in Facebook, why is their something that I’m missing?

Just trying to retrace my steps. I just setup facebook post a in my app and had quite a few hurdles to get over with it. My issues were trynig to figure out what my key hash was.

If you go to this page https://developers.facebook.com/apps and click on your app then click on edit settings and make sure

Native Android App is checked and that all the fields are filled out.

Ok done I filled out the Native Android App and still nothing. What’s my next step?

Hmm, are you seeing anything in the logs about it failing?

Are you using an android of iOS device to test it on?

I’m using iOS to test my app.

The only error I get in the log is this:

ERROR: First argument to facebook.login() should be a string.

What is that? Is that normal to get? The error is produce when I click on any of the buttons of the Facebook sample app on the Corona simulator.

Hi there, Two things might be the issue here. First, the facebook APIs don’t run in the Corona simulator. You have to build for an actual device to test them. (You mentioned you were trying it on iOS, but then you mentioned the simulator, so I sang sure if you we’re running on an actual device or not.) Second, that error you’re getting is important, yes. When you call facebook.login(), the first parameter is your Facebook app ID. Although the app ID is a number, you have to pass it to facebook.login() as a string (as noted in the API documentation here: http://docs.coronalabs.com/api/library/facebook/login.html). It sounds like you’re passing it as a number, in which case the login will fail, and any subsequent calls to facebook.request() will also fail. Hope this helps. - Andrew

Yes the missing part was appid number was suppose to be in a tostring. I tested on the device and was able to launch the Facebook app. But with an error saying Invalid App ID. Does that refer to my Facebook, or ID from my game?

EDIT: The cause of the Invalid App ID was because I was using build 907 instead I use build 1034. I used the sample Facebook app and It worked.

Thanks for the help

Did you setup your app on facebook itself?

Yes I did setup my app in Facebook, why is their something that I’m missing?

Just trying to retrace my steps. I just setup facebook post a in my app and had quite a few hurdles to get over with it. My issues were trynig to figure out what my key hash was.

If you go to this page https://developers.facebook.com/apps and click on your app then click on edit settings and make sure

Native Android App is checked and that all the fields are filled out.

Ok done I filled out the Native Android App and still nothing. What’s my next step?

Hmm, are you seeing anything in the logs about it failing?

Are you using an android of iOS device to test it on?

I’m using iOS to test my app.

The only error I get in the log is this:

ERROR: First argument to facebook.login() should be a string.

What is that? Is that normal to get? The error is produce when I click on any of the buttons of the Facebook sample app on the Corona simulator.

Hi there, Two things might be the issue here. First, the facebook APIs don’t run in the Corona simulator. You have to build for an actual device to test them. (You mentioned you were trying it on iOS, but then you mentioned the simulator, so I sang sure if you we’re running on an actual device or not.) Second, that error you’re getting is important, yes. When you call facebook.login(), the first parameter is your Facebook app ID. Although the app ID is a number, you have to pass it to facebook.login() as a string (as noted in the API documentation here: http://docs.coronalabs.com/api/library/facebook/login.html). It sounds like you’re passing it as a number, in which case the login will fail, and any subsequent calls to facebook.request() will also fail. Hope this helps. - Andrew

Yes the missing part was appid number was suppose to be in a tostring. I tested on the device and was able to launch the Facebook app. But with an error saying Invalid App ID. Does that refer to my Facebook, or ID from my game?

EDIT: The cause of the Invalid App ID was because I was using build 907 instead I use build 1034. I used the sample Facebook app and It worked.

Thanks for the help