"Ask to join" a Facebook group - facebook

For an interactive kiosk project I need to add the functionality for the user to "Ask to join" a certain group.
I was imagining this would be pretty straight forward, but I can't really find any trace of this functionality in the Graph API...
Does this functionality exist at all?

Unfortunately as far as I know you can't programatically make a user join a group (due to security and privacy issues), same goes with liking a page (you have to ask a user to do that manually).
However what I can suggest doing is checking if a given user is already a member of that group (using the group_member table) and if not, redirecting him to the group and asking him to join it.

Related

Keycloak: How to customize user email to be mandatory and immutable

Our old authentication mechanism had mandatory and immutable email for each user by design. After exporting old authentincation mechanism into the hands of Keycloak 4.6.Final, We are left with old references to users by email as this was in fact used as an id from the beginning of this system.
Keycloak User Management UI is delivered to client as part of a whole system. Now we're facing a problem where the users administrator at the customer's side is able to create users with no email, and even worst, he give a user one email and overtime change it. Leaving this option open is most likely to create bugs for the client as the user base grows.
I've been digging around google, sof, keycloak mailing list search engine, and couldn't find any documentation relating developer's ability to apply configuration on top of particular keycloak distribution which would set features such as mandatory and immutable on some user attributes which are optional and editable by default.
I know that question is old, but maybe someone will need answer.
it's 2022-11 and there is experimentas feature in Keycloak 20. You can enable declarative-user-profile and then customize your user profile and set required fields and other options. user-profile
This feature may be removed in the future, because it's experimental.
And this feature has bugs (tried with 20.0.1). For example, if you add required attribute group, then you can see groups while creating new user and you can select groups. But if you try to save user, then error appears telling, that group is required.

How to tagging groups to yammer conversion

Can we tag (using #) more than one groups to a post so the every one in the group will get notification. Can we do that programatically?
What you are asking for is not currently possible, since it would require posting a message to multiple groups, which is not currently supported (source: I work at Yammer). If you think this feature would be valuable to you, I'd encourage you to support the respective suggestion on UserVoice (https://yammer.uservoice.com/forums/399627-yammer/suggestions/15625800-post-a-thread-to-multiple-groups) -- we look at UserVoice regularly as input for which new features we build for Yammer.
What you could do programmatically as a (somewhat ugly) workaround currently is to get all the users of the second group and CC them (or #mention them) on the message to the first group. You can get the users of the second group using the REST API endpoint /users/in_group/[:id].json -- see https://developer.yammer.com/docs/usersin_groupidjson
Yes, you can:
Post your message to one group (one you consider to be the main group)
Afterwards, click the "Share" link and select another group to which you want to cross-post the message
Dokumentation:
https://support.office.com/en-us/article/classic-yammer-share-conversations-and-files-in-yammer-2c69c57d-2605-4047-830c-089bb41b08bb?ui=en-US&rs=en-US&ad=US

Facebook Graph API pre-defined messages, but with the ability to edit

I am currently building a site for a University study that aims to encourage a select few young people (peer supporters) to share messages around health and wellbeing in a private Facebook group.
I have used the Feed/Share dialog to share relevant links/images, however there are a few bits of content that are just pure text. I am aware that Facebook allows to post a status to a group using the Graph API, however you are not allowed to pre-fill what a user is going to say.
Would it be possible to have the ability to generate the content in a text box allowing the users to edit it as they wish before posting to the group or is this still prohibited?
...allowing the users to edit it as they wish...
No, that is not allowed, it´s prefilling. You would only be allowed to present an EMPTY textbox, where users can write the message. The message always must be 100% user generated.

Checking if a user is a member of a specific facebook group (2016)

It appears there was a big update to the facebook api a year ago and a lot of the info online is inaccurate because of it. I'm trying to create a website that provides additional function for members of a specific facebook group; if a user is not part of a specific group I don't want them in it. Some groups may have more than 5k users but if I have to settle for less, so be it. I'm using the php sdk and have successfully made an initial api call with general user information.
Administrators of the group WILL be able to log in, but apparently Facebook isn't approving the "user_groups" permission (?) https://stackoverflow.com/questions/31171082/check-if-user-is-a-member-of-a-specific-group-using-facebooks-javascript-sdk
I found this but I'm not sure how to make it work. Facebook Graph - Possible To Check If A User Is A Member Of A Group w/o user_groups?
I'm using the graph api explorer and I can get a partial list of the groups I'm in but it's nowhere near complete (it displays 4 out of like 20). My thought was that if I can get a full list of members in a group that I could just do an [if user is in userlist then]
What would you do here?
As far as I understand there is no way to do this without some caveat where it won't work (when you have more then 5k members). It also causes you to create a copy of the members list, instead of when a user wants to access the group.

Facebook Connect Implementation questions

I hope this is allowed but I have a number of questions regarding Facebook Connect, I'm quite unsure on how I should approach implementing it.
I am working on a live music type service and currently have user registration, etc. If I were to implement Facebook Connect alongside this, would I still be able to email the Facebook Connect users as if they were on my database?
Also, would it instead be possible to let users who have Facebook "link" their accounts once registered so I am able to give them the benefits of sharing via Facebook and inviting friends while still having an actual registered user on my system.
I have tried to read up answers to the above questions but what I've found is quite ambiguous.
Thanks, look forward to your views.
Facebook's documentation process is very poor, so don't feel bad about having a hard time getting started. Their wiki-style approach to documentation without any real official documents tends to leave the "process flow" tough to grasp, and requires piecing together parts of a bunch of randomly scattered docs.
Facebook has an obligation to protect privacy, so they never make a user's actual email address available to application developers, through Connect or normal applications. They do have a proxied email system in place that you can use, however, you must get explicit permission from a user in order to email them. There's a decent document on proxied email here. You can get permission by prompting for it; there's several methods for doing so linked in that document.
In regards to linking Facebook and local accounts, this would definitely be the way to go. Once a Connect user logs in, you want to store that fact for that user so you can provide the Facebook-specific functionality. I would simply create a normal user account in the database for every new Connect user that came by, with it's own local id, so that you don't have to do special handling of two different types of user accounts all over the site. That being said, the account would obviously have to be marked as a Facebook user's account (I use an externalId column in my users table), and any part of the site that relied on information you might otherwise have locally would have to handle the Facebook aspect properly (such as using proxied email instead of normal email).
For existing users, you could arrange an "account link" by having a process whereby they log into FB Connect after they've logged into the site already, and you could detect that and simply add their FB id to your users table. After that, they could log in through Connect in the future, or through your normal process. I've never done this, but it should be possible.
If you write the account handling code generically enough, your site will be able to function well no matter what kind of user you throw at it.