0
我有一個Facebook的畫布應用程序,我需要在其中使用FQL。 我嘗試使用下面的代碼(在Facebook的JavaScript SDK)Facebook JavaScript SDK。使用簡單的問題
Output-<span id='temp'></span>
<script type="text/javascript" src="Scripts/jquery-1.4.4.min.js"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
document.getElementById('temp').setTextValue('First');
FB.init({ apiKey: 'my api key' });
document.getElementById('temp').setTextValue('Second');
FB.api(
{
method: 'fql.query',
query: 'SELECT name FROM profile WHERE id=me()'
},
function (response) {
document.getElementById('temp').setTextValue(response[0]);
}
);
</script>
使用FQL但它不工作!它在document.getElementById('temp')。setTextValue('First');
這段代碼有什麼問題?