Banning users from Facebook group - javascript

I'm developing a userscript in which I want to place a "ban member" button next to every post on a group's timeline. I've already coded a way to get post author's UID and place the button, but how to ban a member from a group? Is there any way to do so? Graph API is not working for me in this case.

Facebook API doesn't let you ban users via their API - basically your only option is writing a script that opens a browser and does that for you. You can do it with something headless, like PhantomJS.

Related

Cannot click on contanct elements in whatsapp web using click() function

I was trying to make a WhatsApp chatbot extension. I want to read every unread message and send those contacts some messages. I chose web scraping due to the limitations of whatsapp API and its cost. This is the command I use to click on web elements. For selecting contacts I made the function
var list = document.querySelectorAll('div[class="lhggkp7q ln8gz9je rx9719la"]') //for listing all contacts on the screen
list[0].click()//just clicking a contact of my choice for experimental purpose
but unfortunately, the contact is not being selected so I can't proceed to setting a message and sending it. Is there any way to simulate a click or something? Or am I selecting the wrong element, so the click event is not defined for it?
It is impossible to do it.
You can't do that. You need to buy whatsapp API. Or go for telegram it's free.

How to send notifications using Facebook's SDK for instant games?

I've been working on an instant game for Facebook. All I want is to send a notification that invites the user to play again. I've been checking out documentation for it but it is very unclear on that matter.
I am already using the SDK for instant games and got it running, but I have no idea on how to use the graph API to only send a notification. I don't know in which file I have to put the code for it, nor where to reference it in the index.
you need to add a messenger bot to be able to message users.
check this is the bot docs
[1]: https://developers.facebook.com/docs/games/instant-games/getting-started/bot-setup/

Facebook app user likes without big red alert

I'm making the Facebook app whit JavaScript SDK, and I need user likes permissions to make a like gate. When I go to my app for the first time I get the popup whit permissions and big red alert: "The following permissions have not been approved for use and are not being shown to people using your app: user_likes " When I submit my permissions for approvement they reject me... Is there another way to make a like gate?
If you're having a Page Tab App, then use the signed_request data. If not then you'll need the permission to be able to access the User's likes.
Have a look at my answer here: perl Facebook::Graph API check if user likes page

JavaScript - check Cisco Jabber user status

On my webpage I need to check if given user is available on Cisco Jabber Client. I have both number and user name.
I am already able to send chat messages and start voice conversations, but it would be nice to check if user is online, and for example show cool icon or something.
Is there a simple way to do that in JavaScript/jQuery?
Or is it possible to check it by server side of web application (Spring/Java) and use AJAX?
The service can be accessed using the REST Api's. Below URL can provide some information on this.
https://developer.cisco.com/site/collaboration/call-control/unified-presence/overview/presence-web-service/index.gsp
Honestly, I haven't tried this.

Link to pop of version of gmail message with javascript

I'm working on integrating gmail into an in house application so on a users dashboard they see the 10 newest emails with in their gmail account. I'm pulling in the emails using fsockopen and issue imap commands.
I've gotten the url to direct link to the message that looks something like this: https://mail.google.com/mail/u/0/#inbox/13e2b4235af0b71a
However in a pop up that still contains all of gmails regular interface. What I'd like to be able to do is from the link in our system pop up the gmail pop up version (if you click the "in new window" button within gmail). See below for the gmail pop up I'd like to direct link to.
edit: For those wondering. No grabbing the url from the bar and changing the thread id (th=) doesn't work.
Building it like this makes the application very dependent of Google. If they decide to work something else out as it works faster you need to rethink your hack.
I'd strongly recommend to use a more Generic approach.
Either using the GMAiL API: https://developers.google.com/google-apps/gmail/
Or using SMTP/IMAP/POP commands to the GMail server.
Good Luck!

Categories