Facebook API, comments not showing - python

I'm making a page, with the concept that If someone reply's on a specific post, my page reply's automatic on them. So, I've made a Python-program and let it run 24/7. For me as page-administrator, app-administrator (Facebook app), it works perfect. But, when I react with an other account (normal user, no admin), then I my program returns TraceError 'from'. So, then the program can't find who has reacted...
I've got a small second question. When I go to the page with the other account, I can see the reactions my admin-account placed, but I can't see the auto-reactions my program wrote. So, with my admin account, I see a reaction, with my other account, I just see "show 1 reaction", but when I click on it, it disappears...
Someone who has an idea how I can fix it?
Thanks in advance!

Related

Allow multiple users to login at the same time in Django project

I am working on a django project and I have completed working on it. And I tested it and ran the project in on two webpages in chrome with my localhost:8000 server . I logged in in first page as a first user , lets say user1 and logged in on another page with another username , lets say user2 . But when I refresh the first page , the user1 is not logged in and I get logged in as the user2. The first page user1 is not logged in . I want to login multiple users at the same time so I can interact with the page. Kindly help me .
When the user logs in, django stores information on the browser, which is why this happens. What you can do is open up a private window private window, and have the second user log in there. You can also use another browser to test out a third user. There might be a more efficient method, but this is quick an d simple solution.
UPDATE
After a bit of checking I found a much better solution to the question. Ghost Browser was made for this specific situation. And since as of now this does not work in Linux, you can also use extensions in Firefox, like Temporary Containers, and there probably are similar extensions for other browsers.

Remove phone Discord.py

I am currently testing with different selfbots on Discord.py. I wanted to know if there was a way to remove the phone number off my account. I tried bot.remove_phone but that didnt work. I am completely new to python.
Self botting is against the Terms and Service of Discord.
Moreover, Discord doesn't give out features to further hurt their platform by their API. If Discord happens to detect this your account would be banned. Either way, remove_phone attribute is not included in the Official Discord documentation.
But for clarity, anything considered "user account automation" is disallowed, including custom clients and similar.
Here's Discord's reference:
https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-
I cant make an comment so I have to make an answer, but you could make an requests.delete() to discord, you need the token and its password.
You can find more info about how the request should look like by being logged in discord via chrome, then open dev tools with ctrl + i -> go to network and select XHR then you can try and delete phone number with a wrong password to get an idea how the request should look like
also probably should not use your main since you might do couple mistakes and lose your account

Handle random ForeSee popup using Python and Selenium

I'm new to coding and trying to use Selenium with Python to click through a website and fill a shopping cart. I've got things working well except for the random ForeSee survey popup. When it appears (and it doesn't always appear in the same location), my code stops working at that point.
I read the ForeSee documentation and it says "...when the invitation is displayed, the fsr.r...cookie is dropped. This cookie prevents a user from being invited again for X days (default 90)."
Hoping for a quick fix, I created a separate Firefox profile and ran through the website and got the ForeSee pop up invitation--no more pop up when manually using that profile. But I still get the pop up when using Selenium.
I used this code:
fp = webdriver.FirefoxProfile('C:\path\to\profile')
browser = webdriver.Firefox(firefox_profile=fp)
EDIT: I got the cookie working. I was using the Local folder instead of the Roaming folder in C:\path\to\profile. Using the roaming folder solved the problem.
My question edited to delete the part about the cookie not working:
Can someone suggest code to permanently handle the ForeSee pop up that appears randomly and on random pages?
I'm using using Protractor with JS, so I can't give you actual code to handle the issue, but I can give you an idea how to approach this.
In a nutshell
When following script is executed in the browser's console -
window.FSR.setFSRVisibility(true);
it makes ForeSee popup appear behind the rest of HTML elements. And doesn't affect UI tests anymore
So my protractor script will look like so
await browser.executeScript(
`window.FSR.setFSRVisibility(true);`
);
Theory
So ForeSee is one of those services that can be integrated with any web app, and will be pulling js code from their API and changing HTML of your app, by executing the code on the scope of the website. Another example of such company is walkme
Obviously in modern world, if these guys can overlay a webpage, they should have a configuration to make it optional (at least for lower environments) and they actually do. What I mentioned as a solution came from this page. But assuming they didn't have such option, one could reach out their support and ask how to workaround their popups. Even if they didn't have such option they would gladly consider it as a feature for improvement.

Why does my web2py app keep logging me out

I recently deployed a web2py app, and am going through the debugging phase. Part of the app includes an auth.wiki, which mostly works great. Last night I added several pages to the wiki with no problems.
However, today, whenever I navigate to the wiki or try to edit a page, I'm immediately logged out.
Any suggestions? I can't interact with the wiki if I'm not logged in...
EDIT: It's not just the wiki, I keep getting logged out of the whole site. Other users do not have this problem. It continues even when I select "remember me for 30 days" on login.
Your comment hints at the answer: When you log into the admin session, when you refresh your website, it is now accessed through the admin session, which has no client user logged in.
One solution is to use different browsers for admin and a different browser for client.

Unable to get Python to POST on html

I've been trying to get my python code to post. I have tried using the Postman Plugin to test the post method and I would get a 405 method error. I am planning to have the user post the information and have it displayed.
Currently if I press submit I would get a error loading page, changing the form to get results in the submit button working and returning to the previous page. If I change the handler to post the screen would instantly display '405 Method Not Allowed'. I've looked through the Google App Engine logs and there are no errors. Can someone help me with what I done wrong and advise me on how to the post method functioning?
Thanks for the time.
You're getting '405 method not allowed' because the POST is going to the same url that served up the page, but the handler for that path (MainPage) does not have a post method.
That's the same diagnosis that you were given when you asked this question two hours earlier under a different user id.
Stepping back further to address the "what have I done wrong" question: It seems to me that you've gotten quite far along before discovering that what you have doesn't work. So far along that the example is cluttered with irrelevant code that's unrelated to the failure. That makes it harder for you for figure this out for yourself, and it makes it more difficult for people here to help you.
In this situation, you help yourself (and help others help you) by seeing how much code you can eliminate while still demonstrating the failure.

Categories