Hi all, has anyone had problems tweeting from their app on a device? I used the twitter demo on github to build the feature in my app and it works perfectly when testing it on a corona simulatir build, tweet show up almost instantly on my twitter account however I put my app on a device and no tweet appears on the account it was ment to be tweeted from. There no error report or isError, no warnings, logged in fine and all in all, all seems to go through fine but it nevers shows up. Could twitter be blocking this and if so why only on devices and not on the simulator build in corona?
Provide the github project link and any modified code you created so that other users will have info to help you.
Hi Alex,
Apologies it was Jason Schroeder demo project, not Github lol:
http://www.jasonschroeder.com/2015/07/15/twitter-plugin-for-corona-sdk/
Here my version:
local function go(event) local function showTweet(response, isError, event) if isError then attributes.showResults(response, isError, event); return true; end local webview = nil; local blackout = nil; local url = nil; local function close() blackout.tap = function() return true end display.remove(webview); transition.to(blackout, {alpha = 0, onComplete = function() display.remove(blackout) end}); end blackout = display.newRect(attributes.frontGroup, centerX, centerY, totalWidth, totalHeight); blackout:setFillColor(0, 0, 0, .6); blackout.alpha = 0; blackout.isHitTestable = true; blackout.tap = close; blackout:addEventListener("tap"); blackout:addEventListener("touch", function() return true end); url = "http://www.twitter.com/"..twitter.user.screenName.."/statuses/"..response.id; webview = native.newWebView(centerX, centerY, totalWidth, totalHeight\*.6); webview:request(url); webview:addEventListener("urlRequest", function() end); transition.to(blackout, {alpha = 1}); end if event.action == "clicked" and event.index == 2 then twitter.tweet("Tweeted from @Water Jetters VS Megalodon app, come and try and beat my score # http://www.zombieboffinstudioltd.com", "Icon@2x.png", showTweet); end end if attributes.loggedIn then native.showAlert("Tweet Alert", [[Tweet a status update and image to your timeline telling people what your playing? Tap OK to tweet "Tweeted from @Water Jetters VS Megalodon app, come and try and beat my score # http://www.zombieboffinstudioltd.com!" to @]] .. twitter.user.screenName..[['s timeline.]], {"Cancel", "OK"}, go); end
The code block has made it look a bit messy sorry but hopefully from this you may be able to see if there is anything you think may be a problem.
Kind Regards
Liam
Provide the github project link and any modified code you created so that other users will have info to help you.
Hi Alex,
Apologies it was Jason Schroeder demo project, not Github lol:
http://www.jasonschroeder.com/2015/07/15/twitter-plugin-for-corona-sdk/
Here my version:
local function go(event) local function showTweet(response, isError, event) if isError then attributes.showResults(response, isError, event); return true; end local webview = nil; local blackout = nil; local url = nil; local function close() blackout.tap = function() return true end display.remove(webview); transition.to(blackout, {alpha = 0, onComplete = function() display.remove(blackout) end}); end blackout = display.newRect(attributes.frontGroup, centerX, centerY, totalWidth, totalHeight); blackout:setFillColor(0, 0, 0, .6); blackout.alpha = 0; blackout.isHitTestable = true; blackout.tap = close; blackout:addEventListener("tap"); blackout:addEventListener("touch", function() return true end); url = "http://www.twitter.com/"..twitter.user.screenName.."/statuses/"..response.id; webview = native.newWebView(centerX, centerY, totalWidth, totalHeight\*.6); webview:request(url); webview:addEventListener("urlRequest", function() end); transition.to(blackout, {alpha = 1}); end if event.action == "clicked" and event.index == 2 then twitter.tweet("Tweeted from @Water Jetters VS Megalodon app, come and try and beat my score # http://www.zombieboffinstudioltd.com", "Icon@2x.png", showTweet); end end if attributes.loggedIn then native.showAlert("Tweet Alert", [[Tweet a status update and image to your timeline telling people what your playing? Tap OK to tweet "Tweeted from @Water Jetters VS Megalodon app, come and try and beat my score # http://www.zombieboffinstudioltd.com!" to @]] .. twitter.user.screenName..[['s timeline.]], {"Cancel", "OK"}, go); end
The code block has made it look a bit messy sorry but hopefully from this you may be able to see if there is anything you think may be a problem.
Kind Regards
Liam