![]() |
不包含圖片 |
如:告訴大家我正在使用某款APP,希望友人也能夠來使用看看
Corona裡,能夠輕易的將訊息分享到Facebook,Twitter
只要在code上加入一行system.showPopup("twitter"),
就能夠輕鬆的在twitter上分享
(註:e-mail,SMS,safari開網頁也是利用Popup)
iOS 內建Twitter 能夠輕鬆上傳照片,分享文字
也能夠將位置一起分享(小心隱私~)
只要在code上加入一行system.showPopup("twitter"),
就能夠輕鬆的在twitter上分享
(註:e-mail,SMS,safari開網頁也是利用Popup)
iOS 內建Twitter 能夠輕鬆上傳照片,分享文字
也能夠將位置一起分享(小心隱私~)
(需build for Device才能使用!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function tweetCallback( event ) -- 完成twitter動作後呼叫 | |
if ( event.action == "cancelled" ) then -- 使用者取消 | |
print( "User cancelled" ) | |
else | |
print( "Thanks for the tweet!" ) -- 使用者分享 | |
end | |
end | |
local options = { | |
message = "Hello Twitter world!", -- 預設分享文字 | |
listener = tweetCallback, -- 設定listener | |
url = { "http://coronalabs.com", "http://apple.com" }, --網址類(URL)必須要打在這 | |
image = { | |
baseDir = system.ResourceDirectory, --要分享的圖片所在資料夾 | |
filename = "Icon.png" --圖片檔名 | |
} | |
} | |
native.showPopup( "twitter", options ) -- 只要使用shopPopup,就能使用iOS內建的twitter系統 |
twitter 會用到的參數如下
(初次使用Twitter,系統會帶入登入畫面)
- message
-預設要顯示在Twitter 上的文字 - listener (非必要)
當完成或取消Twitter後會呼叫的function - url (非必要)
需要上傳網址時需要利用設定url參數(給予table)
方法為{"http://tw.yahoo.com","http://www.apple.com"} - image (非必要)
包含兩參數-baseDir,filename
![]() |
同時上傳圖片 |
![]() |
於Twitter上所示圖片 |
您好...
回覆刪除我看了這介紹native.showPopup
http://docs.coronalabs.com/api/library/native/showPopup.html#TOC
他沒有支援facebook上傳圖片的功能...
請問想上傳圖片跟您這篇介紹的方式上傳的話....
corona sdk有什麼方法可以使用呢...
謝謝...
Do this hack to drop 2lb of fat in 8 hours
回覆刪除Over 160 thousand women and men are hacking their diet with a easy and secret "water hack" to drop 1-2lbs each night while they sleep.
It's painless and it works on anybody.
You can do it yourself by following these easy steps:
1) Go grab a clear glass and fill it up with water half the way
2) And then learn this weight loss hack
and become 1-2lbs skinnier the next day!