1
我正在開發一個「share on facebook」按鈕。Titanium Facebook對話框不會出現
但是有一個問題,facebook對話框沒有提示給用戶。
我試圖樣本鈦提供:
function facebook(){
var fb = require('facebook');
var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium Mobile",
message : "Checkout this cool open source project for creating apps",
caption : "Appcelerator Titanium Mobile",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power."
};
fb.dialog("feed", data, function(e) {
var toast = Ti.UI.createNotification({
message:"Default",
duration: Ti.UI.NOTIFICATION_DURATION_LONG
});
if(e.success && e.result)
toast.message = "Success! New Post ID: " + e.result;
else {
if(e.error)
toast.message = e.error;
else
toast.message = "User canceled dialog.";
}
toast.show();
});
}
函數正確調用,但沒有出現。
有人知道爲什麼嗎?也許權限?但我已經讀過,對話框不需要權限!
感謝所有