I am no longer getting the list of friends who use my app. It was working for a few days, now it has stopped working - facebook

I use the FB.api Javascript API to access the list of friends of the current user (me) who also use the app:
FB.api('/me?fields=name,friends.fields(installed,name),birthday,gender,location,email', function(res) {...
I set it up about a week ago and it was working just fine for all the users. It was getting me a list of all the friends but those who used the app, there was an additional parameter with value set to true ("installed" : true)
Now I am seeing that for some mysterious reason this parameter installed no longer appears any more! I have made no change in the code. Any idea why is that what is the right way of getting it again??

This is a known issue, one that Facebook is taking a long time to fix. Please see and repro the issue here: https://developers.facebook.com/bugs/178979062276800?browse=external_tasks_search_results_51d78ad8d6aa07f26501758
As a work-around, you can use the entire friends list and cross-reference every Facebook ID with those in your database to see who is actually using the app.

Related

Facebook Invite Friend Dialog app_non_users filter seems to have no effect

I am building a Facebook Application that sits in a facebook page tab (and has a Canvas URL hook.) I am trying to implement the app_non_users filter.
When I introduce the filter, here is what I see:
In both ['all'] and ['app_non_users'] everyone is shown (including those who have authorized the app)
In ['app_users'] setting, no one is shown.
I am not running this on mobile, and I am passing the parameter in expected JSON form (proved by the fact that Facebook is doing different things for different values.)
I am also not using any other conflicting filters or even the "to" parameter. When I inspect the network tab, I see the following params being passed to FB:
message:Invite Message
title:Select from list of your friends
filters:['app_non_users']
api_key:xxxxxxx
app_id:xxxxxxxx
locale:en_US
sdk:joey
display:async
frictionless:false
redirect_uri:https://xyz.com
__d:1
__user:xxxxxxxx
__a:1
__dyn:798aD5z5CCU-wEbw
__req:9
Based on the above results, it seems to me that Facebook doesn't consider just app authorization to mean that a user is a app_user. So, exactly what makes a user app_user and how do I, as a app dev, make that change?
From the question I think you are using the filter alone without any other filter for the Request dialog box. If that is correct then follow the bug here as it points to the same issue as you are having.
As an alternate, until the bug is fixed, I might suggest you to use more than one filter so that both of them work correctly. I tried the same with RELL here.
I made workaround using 'exclude_ids' parameter and server side PHP.
Usng PHP I have populated exclude_ids with ids of current user's friends which already entered my app (I have those fb ids in my database), so Request dialog doesn't display those friends to user.

Facebook FB.api('/me/accounts') is not returning list of applications

I have been written a code that retrieves users page list and application list so I can make a page tab connector. And I used FB.api(/me/accounts) for this purpose. It was several months ago and it worked well.
https://www.facebook.com/WEBLAB54/app_337216453020586
But suddenly, Facebook api will show me only a list of pages, not a list of applications. I have tried to find solution online, but it seems that nobody has this problem? Also I went to facebook page for manage_pages permission, and there is no changes in documentation.
Does anybody know what is the problem?
I will put a PHP code just in case, but this code worked fine until few days ago.
function get_user_applications(){
$accounts_data = $this->facebook->api('/me/accounts');
$accounts_data = $accounts_data["data"];
for($i=0;$i<sizeof($accounts_data);$i++){
if($accounts_data[$i]['category'] == "Application")
$users_apps[]=$accounts_data[$i];
}
return $users_apps;
}
You have to keep up to date with Facebook :-)
This change was announced back in December, and is effective as of March 6th:
Removing apps from /me/accounts/
We will no longer show apps under /me/accounts/ in the Graph API. You can access the list of apps a user is a developer on by hitting /me/applications/developer/.
https://developers.facebook.com/blog/post/2012/12/05/platform-updates--operation-developer-love/
In response by default we will get only 25 pages and you have to call api like below to get all the pages
me/accounts/?type=pages&limit=200
Here 200 is an assumption, but you have to specify the limit in order to get more than 25.

Facebook: Updating page tabs through Javascript SDK

I'm trying to update my tab on a series of pages on facebook. Due to the volume of pages I'm making batch calls to keep from being rate limited. The batch calls work fine.
That being said, I'm trying to Update a page tab by making the call as stated here. I have the adding functionality working fine, and it's operating as it should. I use the same method of getting and using tokens, and I know moreso that it's not an issue as I have offline access so they don't expire (I get them every page load, but in reality could just store them and not worry about it).
Both calls use the same page ID, app ID, and access token and the call is good. The Error I receive is that the tab does not exist on the page, yet when I go to https://graph.facebook.com/PAGE_ID/tabs/APP_ID my tab is there showing itself as on the page. When I post to that I get the error it's not there.
My question is this: Has anyone gotten this working yet and if so what did your call look like and am I missing something?
I would post code, but it's incredibly long and intertwined in my program so it would be difficult to extract it.
There's a slight issue with the page tabs API at the moment that means in some situations you need to prepend your app id in the call with app_ so /PAGE_ID/tabs/app_APP_ID, give this a try and see if it works.

Getting old records from Facebook using the API

I want to fetch some historical data using the api. But when I access older and older pages, I suddenly hit one that's returning me empty data.
For example, call to this url: https://graph.facebook.com/kenderken/posts?limit=100&until=2010-06-01T09:10:53%2B0000 returns me empty data even that there are posts on my wall that are older then 2010-06-01... (here's the last one that API returns to me: http://www.facebook.com/kenderken/posts/134367776579392 and this one http://www.facebook.com/kenderken/posts/271650467287 is from January 2010, no way to get it via API)...
Any clues on that?
That is a fairly common bug with Facebook. If you search http://bugs.developers.facebook.net/ you will find many similar reports.

Facebook friends.getLists failing

I'm trying a simple request on Facebook to return all my friend lists. I'm trying this in Facebook's test console, as well as through an iPhone app i'm working on.
friends.getLists
(also alternatively through FQL)
SELECT flid, name FROM friendlist WHERE owner=4810796
I am currently logged in, so using that number should be valid.
Both are returning an empty list (not erroring out), but I am certain that I have a few friend lists set up. I've also tried using this with a test account I set up, but got the same results. I could have sworn this command was working earlier.
Can anyone please either verify or reject that this is happening for them?
Thanks.
Makre sure that you have put up everything correctly. See this good step-by-step tutorial :)