1
我想筛选并显示我的朋友状态更新,其中包含帖子中包含的位置/地点。我已经尝试了很多次迭代,但无法获取显示的位置(除了'id'之外的地方),我只想显示包含实际位置的朋友发布的状态更新,我试图从'流' 。以“地方”和“location_post”没有运气任何帮助,将不胜感激这是代码:显示地点/位置名称而不是ID
window.fbAsyncInit = function() {
FB.init({
appId: '<?= $sApplicationId ?>',
status: true,
cookie: true,
xfbml: true,
oauth: true
});
function updateButton(response) {
var button = document.getElementById('fb-auth');
if (response.authResponse) {
var userInfo = document.getElementById('user-info');
var iPid = 0;
FB.api('/me', function (response) {
userInfo.innerHTML = '<img src="https://graph.facebook.com/' + response.id + '/picture">' + response.name;
button.innerHTML = 'Logout';
// get friends activity feed
iPid = response.id;
if (iPid > 0) {
FB.api({ // call fql.query
method: 'fql.query',
query: "SELECT post_id, actor_id, type, description, place, permalink, message FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid = me() AND type = 'newsfeed') ORDER BY place DESC"
}, function (response) {
$('#results').html(
$('#facebookTemplate').render(response));
});
}
});
button.onclick = function() {
FB.logout(function (response) {
window.location.reload();
});
};
} else {
button.onclick = function() {
FB.login(function (response) {
if (response.authResponse) {
window.location.reload();
}
}, {
scope: 'read_stream'
});
}
}
}
FB.getLoginStatus(updateButton);
FB.Event.subscribe('auth.statusChange', updateButton);
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
这里是代码: – user3291159
你想表达什么?发布信息与地点信息混合? – Tobi