我有这个问题,希望你能帮我解决 . 基本上我已经在Corona SDK上设置了Twitter共享(使用社交插件),这样玩家就可以发布他们的高分 . 游戏将保存JPEG图像,然后Twitter在共享时将其加载到消息中 .
现在的问题是,在iOS上,这种方法很完美,但在Android设备上,图像不会显示在邮件正文中 . 你能不能帮助我,因为我一直在试图弄明白这一点,但却无处可去 . 干杯 .
Here is my code to take the screenshot:
function takePhoto()
local baseDir = system.DocumentsDirectory
display.save(overlayGroup, "myScreenshot.jpg", baseDir )
print("PIC SAVED")
end
And this these are the options for sharing:
local options = {
service = "twitter",
message = "You got a highscore! ",
listener = tweetCallback,
image = {
baseDir = system.DocumentsDirectory,
filename = "myScreenshot.jpg"
}
}
And these are the code in build.settings
android =
{
versionCode = "1",
googlePlayGamesAppId = "xxxxxxxxxx", --My code is here
usesPermissions =
{
"android.permission.INTERNET",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.ACCESS_NETWORK_STATE",
},
}