get count of employer from friend & friend's friend - facebook app - facebook-graph-api

I know that using friends_work_history permission, we can access friend's work history. Now, I have 150 friends and out of these 150 friends, 45 friends authorized the app.
Because of this, I have work history of those 45 friends' friends.
Now, I need count of total unique employers of your friends AND your friends' friends who have authorized the facebook app.

Neither FQL nor the Graph API has a count method. You'll need to take the results from your query and count these using another programming language.

Related

Using Invitable Friends API and Taggable friends API to retrieve more information

What does Invitable Friends API and Taggable Friends API return?
Do they return all the friends (both users and non-users of my app) of a user?
If it returns all users, Can I use these APIs to retrieve other detailed information of the friends like Birthdays?
They return all users, but you only get an invite or tagging token and the name, nothing else. You can only retrieve the birthday of a friend if that friend has authorized your App with the user_birthday permission. Else, that permission would not make any sense ;)
Remember, the Invitable Friends API is for inviting friends to a game with Canvas implementation only - and the Taggable Friends API is for tagging friends only.

Facebook Graph API getting friends

I am using the FB graph api to get a list of my friends' friends using:
https://graph.facebook.com/<id>/friends?access_token=<token>
Now the weird thing is that this works for some of my friends and does not work for some others. Could somebody tell me why this is happening and a possible fix?
In cases where it does not work, I get the following message: "Can't lookup all friends of YYYYYY. Can only lookup for the logged in user (XXXXX), or friends of the logged in user with the appropriate permission"
And I repeat, I AM ABLE to get friend lists of some of my friends using the above URL. What permissions are being mentioned here?
In new SDK of the Graph API is not possible to do that.
Take a look here.

Facebook Graph API /me/home Friends Posts

I'm trying to get the home feed for a user, but all the posts by my friends are no longer there (only feeds by Pages show). This happened near the v2.2 release. Are we no longer able to get a user's news feed with their friends posts? https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%2Fhome&version=v2.0
friend permissions are gone with v2.0 - so i assume this happened in April 2014 when v2.0 was introduced, for privacy reasons you can´t get anything from friends who did not authorize your app too. Wouldn´t it be weird if you could just see the posts of friends in the stream of the authorized user, without the friends being able to control this?
Check out the changelog for more information: https://developers.facebook.com/docs/apps/changelog
It looks like friends' news are back on the /me/home end point

Facebook API get friend albums not working for some friends

I'm using the following FQL query
'select src,src_big from photo where aid in(select aid from album where owner=' + contactId + ' and type="profile")'
But it works for about 50% of my friends, and the rest - it doesn't.
Its not a permissions problem because the behavior persists per friend, if it works for a friend - it always works for him.
Is this a Facebook thing, where a user can choose to prevent apps from getting his photos?
(like what happens when some friends are missing from /me/friends )
It will be odd, because it doesn't work for too many friends..
I tried the same with the graph API, and the same happens (some users ok, rest are not)
What is this?
Thanks in advance
Take a look at the Profile settings of your account. Do you see the Apps link on the left?
There's on portion there that says "Apps others use"
People on Facebook who can see your info can bring it with them when they use apps. This makes their experience better and more social. Use the settings below to control the categories of information that people can bring with them when they use apps, games and websites.
Bio
My videos
Birthday
My links
Family and relationships
My notes
Interested in
Hometown
Religious and political views
Current city
My website
Education and work
If I'm online
Activities, interests, things I like
My status updates
My app activity
My photos
If you don't want apps and websites to access other categories of information (like your friend list, gender or info you've made public), you can turn off all Platform apps. But remember, you will not be able to use any games or apps yourself.
If your friends have that checked. I believe apps won't be able to get your friends' images through your access_tokens even if you have allowed the "friends_photos" permission enabled for the app that you're using.
I did an experiment and apparently I found that I must get my friend to also access the app to allow the app to access their photos under the "user_photos" permission. only then can I get their photos using my access token with the "friends_photos" permission.
Not sure if this makes sense to you.

Get the top 10 of fans who have more friends that are fans of a page

Is it possible to generate a top 10 of fans of a page that have the highest number of friends that are fans of the same page?
Thanks!
To get the list of friends from a user, that user has to authenticate your app.
When authenticated (depending on what permissions you ask for http://developers.facebook.com/docs/reference/api/permissions/) you can see if that user is a fan of your page by calling me/likes on the Graph API. You can get friends from me/friends.
Then you might be able to do some sort of lookup to other users of your app to calculate who has the most friends who've liked that page too.