Question

I expect this FQL query to return a non-empty array, because there are comments for that xid (see here). In the app itself, I use Javascript to perform the FQL query inside of window.fbAsyncInit and after FB.init({ //options }); like this:

var query = FB.Data.query("SELECT xid FROM comment WHERE app_id = " + facebookAppId + " and xid = '" + $this.attr("xid") + "'");
query.wait(function(rows) {
    // do things
});

Unfortunately this also returns an empty array ([]). This is bad because we need to use the comments count to decide whether to use the xid attribute (for comment boxes which already have comments) or the href attribute (for comment boxes which don't yet have comments). This will allow us to not lose comments that were made while we used the old-style xid attribute.

Any ideas?

Was it helpful?

Solution

Probably you figured this out by now - I had the exactly same problem and solved it finally. In fact I found that you actually must not include the app_id. The key seems to be to get the correct access token (see my post).

hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top