[RESOLVED] Facebook Key Hashes no longer required for Android?

Hey Naomi. I’m glad too, it was a terrible experience lol. Thanks for reminding me, I was using publish_actions before, but wrote publish_stream by mistake.

Our issue is solved its giving us the wrong hashkey we recreated the keystore again its working .OOPS Still there is an issue still its not asking for any app permissions and not getting posted. If i have already authorized the app then its getting posted. Here is the code what i am using . What Permissions we need to specify in the build settings??? Please share the solution.

local fbappID =“XXXXXXXX”

local function onLoginSuccess()

 – Upload ‘iheartcorona.jpg’ to current user’s account

 local attachment = {

        name = “Test?”,

    link =  “”,

    caption = “itunes/googleplay”,

    description = " TEST",

    message = " GooglePlay : "…playLink,

    picture = " ",

    actions = json.encode( { { name = “SeeMore…” ,link = "http://www.google.com" } } )

   }

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

    facebook.logout()

end

local function fbListener( event )

    if event.isError then

        native.showAlert( “ERROR”, event.response, { “OK” } )

    else

        if event.type == “session” and event.phase == “login” then

            – login was a success; call function

            onLoginSuccess()

        

        elseif event.type == “request” then

            – this block is executed upon successful facebook.request() call

            native.showAlert( “Success”, " Shared Successfully.", { “OK” } )

        end

    end

     return true

end

local function onFBClicked()

       facebook.login(fbappID, fbListener, { “publish_stream” } )

end

end

Any update on a Corona fix for this?  I am able to post content on IOS but Android simply does not post any type of content.

@info8888 replace this line of your code:

       facebook.login(fbappID, fbListener, { “publish_stream” } )

with:

local function getPermissions(event) if(event.type == "session") then facebook.logout() facebook.login( fbAppID, fbListener, {"publish\_actions"}) end end facebook.login( fbAppID, getPermissions)

It should work. You can read my explanation as well to understand why this works and why your code no longer works.

@beckslash,

Your code did not solve the Android issue for me.  Also it makes the facebook login get called twice for whatever reason.  Works on IOS, but not on Android.

I Agree what rxmarccall says its asking twice the app permission. The fb issue is not solved only the thing is that its getting posted at least . The problem that still exists is when we login the fb from the app its asking for the permissions twice and for the first time its not getting posted (if you have not previously approved the app permissions in the fb). After that when You again press the share button it gets posted.  

       I can say its just the temporary fix for now,actual problem still remains. Thanks for the temporary fix.

Yea, users are just going to be confused if they hit “post to facebook”, and nothing happens until they push the button a second time, which they won’t do.

Well your login process should be handling the 2nd login request.  I would not tie it to a button for the users to have to hit and then hit again.  Engineering is looking into to seeing if this is something that we can solve.  No promises. 

Gotta love Facebook.

Yea facebook is the worst haha.  I never use it.  Hoping that it will die a terrible death sooner rather than later.  Might just leave it out of my apps, its more trouble than its worth it seems. thanks for the support as always.

guyz
I’ve generated an appId from facebook and used it in the ‘facebook
connect’ example. .now i used the same appId for the “real game app” im
making. .is that allowed?
coz when i launched facebook from the
“real game app” not from ‘corona facebook example’ im having problems.
it said “the app has no Android key hashes configured”… am i supposed
to use one appId for one app?

guyz
I’ve generated an appId from facebook and used it in the ‘facebook
connect’ example. .now i used the same appId for the “real game app” im
making. .is that allowed?
coz when i launched facebook from the
“real game app” not from ‘corona facebook example’ im having problems.
it said “the app has no Android key hashes configured”… am i supposed
to use one appId for one app?