News API with user location - feed

I'm trying to implement an external news feed. I'm currently using Newsapi.org and able to filter news by country and category. But I would like the news to be local to each user. Is there a way to get the users's location and some how use it in the API to filter local news? If this can be done with Newsapi.org, great!, but I'm willing to use a different API if I need to. Thanks!
I'm currently using Newsapi.org and able to filter news by country and category. But I would like the news to be local to each user.

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.

How to fetch particular users photos from Instagram

I am trying to fetch a particular user's photo using Instagram, lets say one particular sports team, I am unable to proceed further since the API's seem to return images of all users with similar handle? Is there a way around it?
Let me know please.
I am not sure what you're using, but the Instagram API absolutely provides an end-point for an individual user's photos.
Once you've obtained the user's ID you can use the /users/user-id/media/recent and /users/self/feed endpoints as required. What API calls are you currently using, if not those?

Can OrderedFriendsListInitialData Be Accesed Via API

Hi I'm a web developer and a client has asked me if I can build an app that displays the information contained inside the OrderedFriendsListInitialData. This information is found when you view the source code on your Facebook news feed.
The Facebook Terms of Service is very clear about NOT scraping Facebook pages, so I would need to access the data via the API. The idea is to allow users to see this list in a convenient way though a Facebook app.
Also, if this is NOT possible, then would Facebook make an exception to scraping this singular element for the sole purpose of displaying it to the user it was generated for.
I.e. not showing it to other people, only scraping the data to show it directly to the user without saving it to any database.
There is no API available to return the coefficient-ranked friends list - if your app needs to organise friends based on the user's relationship to the friends, a popular method to do this is to examine the user's photo tags and/or news feed and likes to choose friends most closely associated with the user

can i use the facebook data for my data mining project

First i will tell what i want to achieve in my data mining project and then i will ask questions.
I am thinking of using the facebook to find particular user from particular location and from particular community. Then based upon their daily wall posting and likes , dislikes i want to generate a report on what user of particular community are doing or interested in.
Is that legal , i mean can i use my crawler to grab those users public data.
Read the Facebook Terms of Service.
That is what they are for, they tell you what you are allowed to do on their site and what not.
Most likely you are not allowed to access the web site with spiders, and the Facebook API will restrict your data gathering capabilities with rate control etc. except for users that are running your application (or you pay for the data...)

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