How to see mutual friendships in a facebook group? - python

Given an id of any facebook group, using FQL I can fetch all the members of that group, if I am a member of that group. I can also see who of my friends is in the same group as me, that is also not a problem. Now, I need to see of all of the group members, who of them is friends, I mean, if there are 2 group members in the same group as me, but they are not my friends, is there any way to see if those 2 are friends?

Without each of those friends giving you access to view who their friends are, it's impossible. If Facebook allowed this to happen without a friend granting you that access, then I'm going go scream from the hills about a HUGE security hole.

Related

HashiCorp Vault User Audit

We're seeking a solution to enable us audit our HashiCorp Vault instance to obtain a namespace breakdown of:
For each Vault user, the roles or groups that their entity belongs to.
Having reviewed the Vault API explorer commands, it appears this is not a capability that is available using that utility. There's been a suggestion that the HashiCorp Vault API client (HVAC) for Python might be a possible solution, but my initial research doesn't appear to indicate so either.
Will an API client like Postman for instance be the possible answer? Any recommendations or suggestions on how we can perform this task?
The API does provide that information, but the data is organized with groups containing users. You must gather the data this way and create a map as you go. As #furas commented, you will likely hit the limits of Postman trying to do that.
I see you tagged your question with Python, so here is the list of steps you need to do, with links to the corresponding Vault API documentation and HVAC wrapper:
List groups by id to prime your loop. HVAC list_groups
For each group in the list:
Read the group detail to get the member_entity_ids list. HVAC read_group
For each user in the group:
Read the user details and save the results in a map (so that it can be indexed by user). HVAC read_entity
Add the group that got you there in that user's data. Something like users[entity_id].groups.append(current_group['data']['name']).
Print or export your map of users and their groups.
#ixe013 's response is good but you also asked about roles. Some people do tie usernames / email addresses to auth method roles (especially OIDC) by listing them in the auth/oidc/role/${role_name} endpoint's bound_claims map. I'm not suggesting people should use this method, as it doesn't scale as well as the identity system groups, but for completeness it is worth mentioning, as there are indeed three places policies can be assigned: from identity system entity objects, from identity system groups, or from auth method role definitions. And policies are how you grant effective permissions in Vault, so this is completely relevant in an auditing context.

Can you get general user account activity via the Instagram API?

I was wondering if it's possible to utilize the Instagram API with Python in order to gather info on follower account status to seek trends/activity/etc. for my platform. Basically I want to see what brands, etc. users engage with by using the API to see where the accounts who are part of my network go, what they click like on, where they leave a comment/what type of feedback they give/interact across brands. The accounts will consent to this of course, but is this even possible with the API anyways? I have seen services offer this for a fee, so I assumed it's possible somehow.
I assume that when a user leaves a comment it is stored in some database that you can then use the API to see if it matches with some ID or such -- if not then maybe there is a way to do this indirectly, i.e., some kind of background service that can see if a comment/ID matches a username without having to use the API itself. Basically I'm interested if this is feasible/simple -- I'm not too savvy!
This is meant for business and non-business/personal accounts -- also just for the fun of it too.
I have peeked at the API but it does not mention this, and no amount of searching narrows it down.
I know Facebook made some changes with their graph API which basically makes this a dead end on their platform without some possible hackaround if that is even theoretically possible.

Discord.py - How to track if someone joined from a specific invite?

I'm trying to figure out how to see who joined from a specific invite within my guild - is this possible? The end goal is for the bot to grant a role to a user if they joined from a specific invite, and grant a seperate role if they joined from a different invite
Yes, it is, but you'll have to do the heavy lifting.
Here's the reference for the Invite object. It has a uses attribute which stores the amount of times it's been used to join your server: so if you store all the possible invites for your server in memory, and check which one went up whenever a user joins (in on_member_join(), you'll be able to tell which one they used.
This medium article shows a way to do it. There's no other way I'm aware of, or that I can find in the documentation.

Who get comments from post group with Facebook API

I try to get the comments of a post from a group that I am a member (only member) and that by the way, the group is closed, but it does not return anything ..
I try it this way: {postid}/comments
I really do not know if you're allowed what I'm trying to do. What if you let me get is information about the videos that have been posted in the group.
I have never used the Facebook API before, so I know very little about the topic.
If I remember right facebook api allows you to programmatically access content of only public groups. To get data from private/closed groups you need to be admin, as user #WizKid pointed out

Getting names from facebook

I am having a baby soon and I want to give him a unique/relatively less known name from my country. I want to get all names on facebook for a given country (say India) and then find 1000 least common names. I am not able to determine if Facebook API allows me to do this. Can someone suggest which APIs I should look at?
If it is not possible in FB, is it possible in any other social network?
Thanks.
The Graph API. Although I think Graph API takes reference from a user and then search in his friends only or if he/she has a page then in their followers only. The users which are not connected to the user can not be accessed. I've never seen a function which can return all users or their userIDs.
Edit:-
Ok I've found that you might need the Open Graph API and the Action Types, but their's no Action type for country.
This isn't possible. The closest you can do is an FQL query on the name table
SELECT name FROM user WHERE contains('user763410baby')

Categories