FWIW, here’s the alternate way looks like when I tried it. I followed @finefin’s instruction, and it worked nicely (using daily build 706.) I decided to go with integrating Facebook API after all, but I’m posting this just in case it helps. See below.
BTW, in terms of which is better, you’d want to implement both and decide which works better for you. Single Sign On feature that’s been implemented in daily build 707 would be (in my opinion) so much better, but I’m still using daily build 706 at the moment…
Naomi
[lua] local function testNetworkConnection()
local netConn = require(‘socket’).connect(‘www.apple.com’, 80)
if netConn == nil then
return false
end
netConn:close()
return true
end
local function popUpWeb()
if ( testNetworkConnection() ) then
local redirectUri = “http://www.mygamesite.com”;
local fbLink = “http://www.mygamesite.com”;
local fbPic = “http://www.mygamesite.com/mylogo.png”;
local app_id = “123456789”; – this is the app id for the game from FB dev page
local fbName = “My%20Game”;
local message = string.gsub( “It’s super fun. Try it out and beat my score!”, “( )”, “%%20” )
native.showWebPopup( 10,10, screenW-20, screenH-60, “http://www.facebook.com/dialog/feed?display=touch&app_id="..app_id.."&redirect_uri="..redirectUri.."&link="..fbLink.."&picture="..fbPic.."&name="..fbName.."&description=”…message )
end
end
– When a user presses a button, the popUpWeb function launches.
– Some space on the bottom of the screen is set aside to display “close” button that would close the popup
– This one is set up for portrait view.[/lua]
[import]uid: 67217 topic_id: 19775 reply_id: 85984[/import]