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

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.

Related

Get old Facebook posts from public FB page

For a university research project I need to view some old posts on public Facebook pages from a specific date range (January 22-31 2014.) I was planning just to copy and paste each post but I have run into a problem with some of the pages that generate a very high volume of posts. Facebook will not display past a certain date. Even with scrolling down, at a certain point the posts stop displaying (this is true by month, so it jumps from January 25 directly to December 31 for example).
Here are the pages I am interested in:
https://www.facebook.com/Syrian.Revolution
https://www.facebook.com/Syrian.Truth
I have read about Facebook's Graph API but have had some trouble using it (I don't have a developer's background.) Also the posts are mostly in Arabic so that may be a problem.
I just need the pages' posts, not the comments sections.
Thanks anyone so much for your help, it is very appreciated.
Really depends on what language/environment you're using. As a simplest case, you can just use Graph API Explorer (https://developers.facebook.com/tools/explorer) and make a call:
{{page_id}}/posts
There are a lot of ways you can improve this call for your benefit. For example, you can use a limit parameter to increase the default number of results it retruns.
{{page_id}}/posts?limit=200
By default, this returns a lot of fields, you can limit the fields.
{{page_id}}/posts?limit=200&fields=id,message,created_time
You can visit https://developers.facebook.com/docs/graph-api/reference/page/feed/ to find out which fields are supported.
In order to get results during a certain time-range, you can use the created_time field to determine if a post belongs to a certain time interval.

Google Doubleclick blank ads in homepage

I am owner of the website legiaodosherois.com.br and I am having issues after starting my first paid campaign with Google Doubleclick for Publishers. All my ad blocks are set for Adsense fallback and it was working pretty well until two days ago when all my ad blocks started to get empty only at homepage, and running fine in all the other pages. I tried to use the debug console by appending the ?google_force_console=1 at my homepage url but just by adding this piece of query string it already makes the ads shows up, so to reproduce my error you must access http://www.legiaodosherois.com.br/?google_force_console=1 and then access http://www.legiaodosherois.com.br/
I couldn't see any problems by checking this debug data, and Google says that the Ad Units are tagged correctly. What can I do?
UPDATE: I just have found that some specific pages such as http://www.legiaodosherois.com.br/2013/vazam-videos-com-as-primeiras-cenas-de-guardioes-da-galaxia.html also aren't displaying any ads!
Thanks in advance and sorry for my bad English,
Vinicius
It happened because some of my posts received a false positive flag from Adsense bot which forbid these pages to show ads. As they were also being shown in the homepage, it was also forbid to show ads. After cleaning them up, it started to work fine!

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

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.

get facebook page full public photostream

there's only one similar question and it's not been answered. not for me at least.
There are public pages on Facebook, suppose i want to get their photostream ? their album pictures ?
I don't see how the Graph API allows me access since i can't get an access token, if i browse from my browser, NOT LOGGED IN, i can still see this public information, so how do i use the AI to access it.
BTW, i tried scrapping with python+mechanize and it's no go as if u get the regular we photo stream u get only partial, no all of it and the rest you need to scroll or to know how to build the same request the browser is building, but suprise suprise the JS doing the request is obfuscated pretty well...
Any help ?
in short it's not possible to do what i wanted annonymously, moreover at the moment, only some of the API works in the web site by accident only, if u are not logged in FB do not want to let u see any page and anyone, considering the last article about their cooperation with the US gov. it's not surprising.
In any case i just use grease money and FF to get a full page\album and then download the whole thing and i i need scrapping i'll do it on those pages with a script.
basically if i log in i can get a full page using the scripts in script monkey.... though script monkey is easier since he has the browser to parse all the data and works inside the browser...
I gave up after 3 weeks...

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.