how to add javascript variable value in facebook feed text
I m trying to add javascript variable value to facebook feed text function as below
var question = document.getElementById("question").value;
var attachment = {
'name':'xyz',
'href':'xyz',
'caption':'testing',
'description': question ,
'media':[{'type':'image','src':开发者_运维问答'9090.gif','href':'xyz.php'}]
};
Facebook.streamPublish('', attachment);
but it is not displaying value of variable in that. Please help me.....
In Facebook (FBJS), you should use getValue()
instead:
var question = document.getElementById("question").getValue();
精彩评论