facebook login Corona

The text file wasn’t helpful. For future reference it would be helpful to stop all other apps. There is a bunch of messages from whatsapp and an audio player that makes it hard to find messages. Also are you running on BlueStacks or an actual device?

Lets try this a different way. Are you building on Windows or a Mac?

Can you post a screen shot of the build screen just before you hit the button to start the build (please do not blur out any fields).

Thanks

Rob

Hi!

 

I build on Windows. Yesterday I was examining the text document called "ErrorClave.txt " and filter the results facebook . I found the message saying the hash key was the same as that came in the screenshoot of the error message facebook , I have copied the settings of facebook developers and seems that already works .

 

 

How I can make a screenshot and upload it to the same capture on facebook? make screenshot and saved in pictures on mobile but my problem is not how to tell the name of the file I want to publish. this is the code:

 

 

Thanks Rob

 

Best regards,

Tania.

I really could use to see a screen shot of your build screen where it shows me the Keystore and Alias information.  I’m going to have you break down each step of creating a key hash and see where the error is happening. The keyhash you have is invalid and we need to create one. Since we can’t find where Facebook is supposed to tell you what to use, we have to do this. Once I have that screen shot, hopefully I can give you the exact commands needed to determine the problem.

Just to help you understand the process. The command in our guide is actually like three commands that are chained together. That is the output from the first command becomes the input to the second command. The output from the second becomes the input to the 3rd.

If there are any errors along the way (file not found, invalid password, etc.), you will get a keyhash output by the last step, but it won’t be based on the keystore you’re using. I’m going to have you execute the commands one at a time looking to see what the output is and where the problem is occurring, but I can’t give you exact commands until I know where your keystore is and what alias you’re using.

Rob

Hello Rob,

Thank you very much for your attention.

Ok this is the build screen, I hope you can help me.

I feel like I’m giving you the run around. But I need to learn more.  Can you send a screenshot of your Facebook Developer Portal where you’ve entered the keyhash?

Also, can you try our newer facebook plugin:  Change build.settings to use:

["plugin.facebook.v4"] = {     publisherId = "com.coronalabs" },

and see if we get improved messaging in the console log. I would need you to re-capture the console log. Please turn off the music player and whatsapp before you capture the run. This will get a bulk of the messages out of the log run.

Thanks

Rob

Hi!

Here I send screenshots you asked.

I have already changed build.settings with the new facebook plugin that you  has recommended me .

When starting the app , press the button to post on facebook and works perfectly the first time but the second does nothing and not get an error message.

I hope we finally get to fix it .

Thank you very much.

Best regards.

Tania.

Well you seem to have gotten past the keyhash problem. Now your code is wanting to work with the old plugin and it needs updated to the new version. Please see the migration guide and adjust your code to the new way the plugin works.

Rob

Hello Rob!

 

The problem is that it does not work in all cases.

Only the first time that you press it posted on facebook but other times it does nothing and gives no error.

 

On the other hand , I want to make a screenshot when the game is over and the results are shown and that capture upload it to facebook.

So:

   1. I use this statement to make screenshot : local capture = display.captureScreen()

   2. The capture is saved in the pictures folder on my device.

  1. To publish that captures on facebook I try to use this instruction: facebook.request( “me/photos”, “POST”, capture ) but does not work.

Also, I have tried using this:

 

local attachment = { message = “My score!<3”, source = { baseDir=system.DocumentsDirectory, filename= capture, type=“image” } }

facebook.request( “me/photos”, “POST”, attachment )

 

 

        

        And it does not work . the problem that i dont know how tell the baseDir value variable to take the image of the pictures folder on my device and also not to put in filename . Really do not know if this can be done …

 

 

In the facebook plugin documentation v4 I find nothing… I do not get it.

Can you write me a code example that I have to use please?

 

 

 

 

Thank you.

Tania.

 

You probably want to use display.save() instead. This will create an image in a known sandbox directory:

display.save( display.currentStage, { filename="screenshot.png", baseDir=system.TemporaryDirectory, captureOffscreenArea=true, backgroundColor={0,0,0,0} } ) local attachment = { message = "My score!\<3", source = { baseDir=system.TemporaryDirectory, filename="screenshot.png", type="image" } } facebook.request( "me/photos", "POST",&nbsp;attachment&nbsp;)

Hello Rob,

 

I want to thank the help.

I want to ask one thing. In my code when you win a game in the end the box scores appears and also the button which you can share on facebook that score appears. 

 

The first time you press the button to share on facebook , share the image with the result without problems but later when you want to share the result of another level it is locked and the app stops.

 

 

I do not know if it is because the screenshot is always kept with the same name or the problem is in my code … please can you help me? this is the code:

 

 

local botonfb =  display.newImage(“images/fact.png”)

   botonfb:setReferencePoint ( display.CenterReferencePoint )

   botonfb.x = imgRecords.x  

   botonfb.y = lbLifes.y + 90

   pause:insert ( botonfb )

local function listener( event )

      

       print( “event.name:” … event.name )  --“fbconnect”

       print( "isError: " … tostring( event.isError ) )

       print( "didComplete: " … tostring( event.didComplete ) )

       print( “event.type:” … event.type )  --“session”, “request”, or “dialog”

       if(event.phase == “release”) then

           facebook.login( appId, listener )

       end

       if ( “session” == event.type ) then

           --options are “login”, “loginFailed”, “loginCancelled”, or “logout”

           if ( “login” == event.phase ) then

               display.save( display.currentStage, { filename=“screenshot.png”, baseDir=system.TemporaryDirectory, captureOffscreenArea=true, backgroundColor={0,0,0,0} } )

                local attachment = { message = “This is my score achieved in Dogchild! <3 Can you get better?”, source = { baseDir=system.TemporaryDirectory, filename=“screenshot.png”, type=“image” } }

                facebook.request( “me/photos”, “POST”, attachment )

           end

           elseif ( “request” == event.type ) then

              print(“facebook request”)

            if ( not event.isError ) then

               local response = json.decode( event.response )

            end

           elseif ( “dialog” == event.type ) then

               print( “dialog”, event.response )

          

           end

end

local function loginFace( event )

       facebook.login( appID, listener, { “publish_actions”, “user_birthday” } )

end

botonfb:addEventListener( “touch” , loginFace )

As always thank you very much.

Tania.

What would be more helpful is the contents of your console log. 

Rob

this is the console 

Tania

The Facebook V4 plugin does not require an AppID as the first parameter. It expects the listener function as the first parameter. You also have AppId one place and AppID another, which could have been a problem with the old plugin.  Remove the Appid’s from your facebook.login() calls and see if that changes things.

Rob