Hi. I am trying to connect the game we’re making to facebook, but I am stuck at getting hash key. Can anyone give me some tutorials or what should I do because I don’t really know what to do. Thanks in advance
Yes. we finally connected our game to facebook. But now, we’re having another problem about logging in/logging out and sharing to facebook. We just want to share 1photo from our game and text i.e score from a game. Can you please how to do it? I already read the docs about it but it doesn’t go well.
Can you please post a snippet of your code?
I can already login/logout, have fb listeners. But I can’t post to facebook using facebook.shareDialog(“feed”) I don’t know what params are needed. It is not in the documents, only “link”, " photo". Just need to show a dialog that show score from a game then share it. And also icon of the game. Any tutorials/docs?
Have you used this guide? Helped a great deal for me!
https://docs.coronalabs.com/guide/social/usingFacebook/index.html
Simple example to let users share on FB
if fb.isActive and fb.getCurrentAccessToken() ~= nil then local shareParams = { title = "Check out this new game", link = "https://link.to.my.game", description="This game is just awesome" } fb.showDialog( "feed", shareParams ) end
For more details on what can be passed to the showDialog method, see this guide:
https://docs.coronalabs.com/plugin/facebook-v4/showDialog.html
I’ll look into that and update you if I encounter problems.
I tried this code but got an error “The parameter ‘href’ or ‘media’ is required.” I am using adb logcat to my phone but got no error logs.
the function fb is triggered by a button.
[lua]
local shareParams = {
title = “This is the tittle”,
description=“This is the description”,
name=“This is the name”,
link = “https://i.have.a.link.here”,
}
local function fb()
local accessToken = facebook.getCurrentAccessToken()
if accessToken == nil then
facebook.login()
print(“Facebook Login - beginner lua”)
else
facebook.showDialog( “feed”, shareParams )
end
end
[/lua]
Try removing the “name” key and value pair from share pramas
Same result. Any other suggestions? And is there exceptions or donts in the links params? cause I’m putting “www.google.com” there just for testing.
Any other suggestions? I already tried what I think will work but I can’t share texts, only photos and link. And I notice on the docs on facebook that there is “Deprecated Parameters”? and they will ignore params like descriptions, name, caption. Is there no other way to share scores from my game?
Most of those entries are deprecated. Please see: https://developers.facebook.com/docs/sharing/reference/feed-dialog
okay those parameters are deprecated. So what paramaters should I use now so I can share Scores from my game?
Anyone please give sample code so that I can share Scores from my game to facebook. Im really out of ideas. I already gone back and forth on the docus but I can’t find the right parameter.
Yes. we finally connected our game to facebook. But now, we’re having another problem about logging in/logging out and sharing to facebook. We just want to share 1photo from our game and text i.e score from a game. Can you please how to do it? I already read the docs about it but it doesn’t go well.
Can you please post a snippet of your code?
I can already login/logout, have fb listeners. But I can’t post to facebook using facebook.shareDialog(“feed”) I don’t know what params are needed. It is not in the documents, only “link”, " photo". Just need to show a dialog that show score from a game then share it. And also icon of the game. Any tutorials/docs?
Have you used this guide? Helped a great deal for me!
https://docs.coronalabs.com/guide/social/usingFacebook/index.html
Simple example to let users share on FB
if fb.isActive and fb.getCurrentAccessToken() ~= nil then local shareParams = { title = "Check out this new game", link = "https://link.to.my.game", description="This game is just awesome" } fb.showDialog( "feed", shareParams ) end
For more details on what can be passed to the showDialog method, see this guide:
https://docs.coronalabs.com/plugin/facebook-v4/showDialog.html
I’ll look into that and update you if I encounter problems.