Has anyone had any problems using this methos with Facebook? What happens for me is the webpop launches, but nothing ever loads. The Twitter works, no problem.
Here is my whole code in it’s pretty messy entirety.
[code]
local fbButton = display.newImage (imgPath … “Fb_Blue.png”)
fbButton.x = display.contentWidth *.8
fbButton.y = display.contentHeight * .6
local twButton = display.newImage (imgPath …“Tw_Blue.png”)
twButton.x = display.contentWidth *.7
twButton.y = display.contentHeight *.6
local closeButton
local webPopBG
function closeWindow(event)
native.cancelWebPopup()
if closeButton ~= nil and closeButton.removeSelf then
closeButton:removeSelf( )
end
if webPopBG ~= nil and webPopBG.removeSelf then
webPopBG:removeSelf()
end
end
local function callTW(event)
if event.phase == “ended” then
closeButton = display.newImage(imgPath …“closeBack.png”)
closeButton.x = display.contentWidth *.75
closeButton.y = 30
closeButton:addEventListener(“touch”,closeWindow)
webPopBG = display.newRect(0,0,display.contentWidth, display.contentHeight)
webPopBG:setFillColor(0,0,0,50)
local message = “I got " …scoreInfo… " on Circus Big Pop Lite! Can you beat that? http://itunes.apple.com/us/app/circus-big-pop-lite/id521759035?ls=1&mt=8”
local theString = string.gsub(message, “( )”, “%%20”)
native.showWebPopup( 20,40,display.contentWidth *.8 ,display.contentHeight *.8, “https://twitter.com/intent/tweet?text=” …theString)
end
end
local function callFB (event)
if event.phase == “ended” then
closeButton = display.newImage(imgPath …“closeBack.png”)
closeButton.x = display.contentWidth *.75
closeButton.y = 30
closeButton:addEventListener(“touch”,closeWindow)
webPopBG = display.newRect(0,0,display.contentWidth, display.contentHeight)
webPopBG:setFillColor(0,0,0,50)
local fbMessage = “I got " …scoreInfo… " on Circus Big Pop Lite!”
native.showWebPopup( 20,40,display.contentWidth *.8 ,display.contentHeight *.8, “https://facebook.com/dialog/feed?app_id=343967615657719&link=http://itunes.apple.com/us/app/circus-big-pop-lite/id521759035?ls=1&mt=8&picture=http://c2mpg.com/media/9878/1.jpg&redirect_uri=http://www.facebook.com/CircusBigPop?sk=wall&name=” …fbMessage… “&description=Can you beat my score?”)
end
end
fbButton:addEventListener(“touch”, callFB)
twButton:addEventListener(“touch”, callTW)
[/code] [import]uid: 97023 topic_id: 9695 reply_id: 107112[/import]