accessing personal account data using graph URL - facebook-graph-api

I used graph API to extract users data for my project. I extracted based on the username of some popular companies. I am just curious about extracting data of personal user contents based on their username. Like all the posts and comments my friends posted recently. Is it legal or frowned upon?

You can only get data of users who authorized your App. Getting the posts needs the user_posts permission, for example. There is no legal way to get posts or any data without authorization. There is no way to get data of friends without their permission/authorization either.

Related

Using facebook graph api to read photo tags

I am building a website using React and Redux to search facebook photos through tags like my Friends name or by location. User needs to login with facebook so that the application can read its pictures. A user simply puts in the search filters like Tagged users or the location of the picture and my app will show results based on the filters. This will help to find old photos with friends which sometimes get lost on social media due to a large number of photos present(Uploaded or Tagged)
I am trying to fetch mutual photos of me and my friends using my access token and trying to read the tags present in the photos through API but the Response contains only my name in the tags and not other people who are tagged in that photo.
Is there any way to fetch the users who are tagged on a photo uploaded? Any help is appreciated.
Graph api link
Access to any data involving your friends is only possible if those friends specifically authorized your App too. You cannot even get an ID of a friend if he did not authorize your App.
Yes, in order to access involving your friend to authorize your app. But from the details i can see that,
"A user access token may read a photo that the current user is tagged in if they have granted the user_photos or user_posts permission. However, in some cases the photo's owner's privacy settings may not allow your application to access it."
Note: Just need to verify users privacy setting once again.

Would a graph db be a good fit for this kind of data

This is the essence of what the app I am creating does (simplified but its the general usage):
Users (who are authorized and authenticated using AWS Cognito and Federated Identities) can create/write articles. Other users can choose to read random articles (even if they are logged in as guests, but guests can't create articles). Users can also see articles they've written and how many people have read them, liked them etc. Articles can also be reported by Users (as inappropriate, incorrect etc) which can lead to the Article being deleted/hidden from other users after a review process.
There are also permissions that need to be provided for users if they abuse the app to prevent them from creating articles (or if they just go around reporting everything in sight to stop them from being allowed to report).
Currently I store the articles in a MySQL db and store information when an article is read liked using a NoSQL db(DynamoDB). I recently came across AWS AppSync which seems to store app data in a graph db.
All the data seems like a Graph db would be a good fit, except I need to be able to retrieve some number of random articles. Is that even possible in a graph db? It seems like that operation would be a bad fit for Graph dbs, but I've never used them so I am unsure.

Getting basic profile information of some one using graph API

I am new to graph api.
i have done slight reading and found that we need access tokens for accessing a profile, but for my application i only have access to the email-id of a person
I just wanted to know if i can get anyone's basic profile information by just knowing thier E-mail id.
help in anyway way would be appreciated.
No, without authorization you can´t get any user info, and you can´t search for Facebook users by email. You would have to authorize users with the email permissions and compare it that way.

Montreal Canadiens Facebook Graph API returns no posts

I'm using the Graph API to return Facebook posts from all NHL teams. Every team returns the posts fine except for the Montreal Canadiens, which returns no posts. I verified that there are posts on their wall, and that the Facebook ID that I used is correct(see here)
I get back an empty JSON list when I try using this link for the Canadiens:
https://graph.facebook.com/110877132302973/posts?access_token=(my access token)&limit=10
Any help would be appreciated! Thanks.
Haotian
The posts on that page all have a custom privacy setting - you need to make sure you're attempting to access them using a User access token for a user that meets whatever restrictions they've applied.
App or page access tokens won't be able to see the posts, nor will user tokens for users who don't meet the restrictions

How to use Facebook APIs to show one's friends list to other visitors?

I'm able to fetch my friends list using Facebook API (which requires me to log into my FB account) and I'm trying to show my friends list to other people visit my site.
I've tried using Twitter and its quite simple. https://api.twitter.com/1/friends/ids.json?cursor=-1&screen_name=codef0rmer returns my followers ids.
Is that possible using Facebook API, If yes, How to do that?
To access the /friends connection you need a valid access token for the current session. This means you can't access this connection for other users
https://developers.facebook.com/docs/reference/api/user/
https://developers.facebook.com/docs/reference/fql/friend/
This means that unless you get a users friends and store them in your database, you won't be able to do this. ( Unless you use longer living access tokens (I say longer living as offline access is being deprecated)
Saying this, I'm not sure if you are allowed to store this information. I know friendslists aren't allowed to be shown to other users so this is potentially dangerous territory on facebook TOS. The privacy policy is here https://developers.facebook.com/policy/ but I think this is something you may need to clarify with Facebook directly as it looks like a slightly grey area