Tar*_*hri 4 facebook facebook-fql facebook-c#-sdk
我有以下FQL我想加入用户表添加名称字段!我怎么能这样做?在我测试正常的左连接后,我得到了错误消息(601加入不可能与FQL).我如何加入并添加名称字段????
<!DOCTYPE html>
<html>
<body>
<div id="fb-root"></div>
<a href="#" onclick="getPhotos();return false;">Get Photos</a>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({ appId: 'yourAppID', status: true, cookie: true, xfbml : true });
function getPhotos() {
FB.login(function(response) {
if (response.session && response.perms) {
var oneWeekAgo = Math.round((new Date().setDate(new Date().getDate()-7)) / 1000);
FB.api(
{
method: 'fql.query',
query: 'SELECT pid, caption, aid, owner, link, src_big, src_small, created, modified FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner IN (SELECT uid2 FROM friend WHERE uid1=me())) AND created > ' + oneWeekAgo + ' ORDER BY created DESC LIMIT 20'
},
function(response) {
alert('Photos: ' + JSON.stringify(response));
}
);
}
} , {perms:'friends_photos'});
}
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
pht*_*ven 11
做这样的事情:
FB.api({
method: 'fql.multiquery',
queries: {
'query1': 'SELECT uid2 FROM friend WHERE uid1 = me()',
'query2': 'SELECT vid, owner, title, description FROM video WHERE owner IN (SELECT uid2 FROM #query1)'
}
},
function(response) {
// response should have 2 objects in it, both containing an fql_result_set
// array with the data and the name you entered for the query (i.e. 'query1')
alert('Photos: ' + JSON.stringify(response));
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15328 次 |
| 最近记录: |