作者hirabbitt (兔子)
看板Ajax
标题[问题] JSON不能放变数吗?
时间Wed Sep 7 23:06:13 2011
我在写FB程式
以下是可以执行的
public function PassStage(stagecode) {
FB.ui(
{
method: 'stream.publish',
display: 'popup',//'dialog',
attachment: {
name: '<? echo $udata[name];?>破关了!',
caption: '大家一起挑战看看',
href: '
http://apps.facebook.com/bombrabbit/?phpCode='
}
},
function(response) {
if(response && response.post_id){}else{}
}
);
}
但是在JSON中加了变数後就不能跑了
public function PassStage(stagecode) {
FB.ui(
{
method: 'stream.publish',
display: 'popup',//'dialog',
attachment: {
name: '<? echo $udata[name];?>破关了!',
caption: '大家一起挑战看看',
href: '
http://apps.facebook.com/bombrabbit/?phpCode='+stagecode
}
},
function(response) {
if(response && response.post_id){}else{}
}
);
}
是不是有更正确的写法?
请帮助我
感谢
--
◤ __ \__◣
◢◤◢◤ ψhirabbitt
◢ ◤ ◢███◣
◢███◣
http://ppt.cc/H~k, █████
█████ #1DttPzLe(Little-Games)
http://ppt.cc/FpAe ██
●█
● █▇███
http://ppt.cc/M9QS ██
╱╲ ●◥█████◣● 怎麽增殖了=口=!?
为你而做的游戏 ◥
╱█
╱╱ ● ◥████ ˇ
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.42.99.108