How to get country group/country/region using Facebook API - facebook

I want to retrieve all country/country group/ region using Facebook API. And with every country i want to have the number of people. Please take a look to the screenshot bellow.

Related

Which Instagram API should I use to collect public data?

Does either the Instagram Basic Display API or the Instagram Graph API allow me to simply get any public user's posts/media programatically? Everywhere in the documentation it says "User data" but it feels like I can only get data of the user that got authenticated using the API. I've set up a Facebook dev account and currently spending 4th hour on calling both APIs without success. Can anyone who has used them help me clear this up?
Most likely, Instagram API Date 365, a tool I currently work for, may help you as an alternative to using Instagram Basic Display API or the Instagram Graph API because this API is created especially for scraping bulk data about posts and users.
You can get such post data as post content (text, language, list of hashtags, list of tagged users), owner ID, location ID,
engagement info, etc. Also, it is possible to download comments (selected or on a specific post) and replies to them.
You can view this for more info.

Get all of location data of that city

I want to get location data of my city. I don't know what I should to use, FQL or API.
Now, I do follow the developer's guide on FB. I can login and show info from myself only.
You can user the Search API as described here:
https://developers.facebook.com/docs/reference/api/search/#types
To get the information about places, see this example:
https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000

Get names from Graph API if the ID provided is a non-friend?

I am building a turn-based game and would like to allow players to play games against other users in the database that are not their friends. Currently I am only storing FB ids from which I am providing a mixed list of friends and non-friends to select from. I have a call to retrieve pictures and names from the FB API but only picture urls are being returned for non-friends. Is there another way to get names from FB API or do I need to store names in my database?
As outline in Graph API User Section, you can make a call to the Graph API and get the information (User's name) that you need.
This is an excerpt from that page which is relevant to your requirement:
You can choose the fields you want returned using the fields query
parameter:
https://graph.facebook.com/me?fields=id,name
Modify the above API call like this:
https://graph.facebook.com/THE_USER_ID?fields=name, picture
Also of importance is in the Fields table listed on the page linked above. To get the User's Name, No access_token required
Now, you haven't tagged the platform you are working on, so I cannot give you the actual code. I work on Android and am not familiar with other platforms. But the Graph API call will essentially remain the same.
Once you have the User's name and Profile Picture, then you can store in your Database if you so desire.
You should be able to get a JSON object with the name, username, id and photo of any user without an access_token by making a call to:
http://graph.facebook.com/USERNAME_OR_ID

Facebook: Gender-specific dummy profile pictures via graph API

I want to retrieve gender-specific dummy profile pictures via the graph API if possible. By trial and error, I found a URL that retrieves the genderless picture: https://graph.facebook.com/picture?type=square. So I'm hoping male and female might be available too.
How about creating two test users under your app, one of each sex.
Then point to their generic pictures
http://graph.facebook.com/TEST_USER_ID/picture?type=square,
That way if at any point Facebook changes their pictures, you automatically get those changes. :)

Facebook Graph API: Get date of joinin

Follow up to this question for Facebook Friends.getAppUsers using Graph API that pulls friends using app by
https://graph.facebook.com/me/friends?fields=installed
is it possible to get date of joining also with the id’s?
No, Currently it is not possible to get date of joining of user to app.
But you can do one thing whenever any fb user registers/ connects with facebook application, store current date/time with his facebook id in your system. And when you want display date of joining then map friends id with your database table.
Nope, you can't do this :( Even trying to get all their news feed and choosing the first or most backdated one won't work anymore. A very funny and probably irrelevant attempt could be by searching the user's inbox for a "welcome to facebook" message.
Also, if you could tell us why you need this information, you might be able to get suitable alternatives.