tags:

views:

16

answers:

1

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.....

+1  A: 

In Facebook (FBJS), you should use getValue() instead:

var question = document.getElementById("question").getValue();

More Info:

http://wiki.developers.facebook.com/index.php/FBJS

Sarfraz
I got solution. thanks for help..............
@user392406: You are welcome :)
Sarfraz