0

I wrote a code that can login to messenger, but I couldn't send a message to a user. how can i do this? What I want is to log in to messenger.com and send messages to Instagram users in a txt file in order. (I want to perform this operation using the python requests library)

5
  • Welcome to SO! What exactly have you tried so far? We're much more here to help with specific questions of the form "I tried X, but it did not do what I expect and instead resulted in an error!" accompanied by a Minimal, Complete, and Verifiable example Commented Aug 14, 2023 at 15:51
  • I was only able to login to messenger.com but couldn't figure out how to send a message. Commented Aug 14, 2023 at 16:32
  • Please provide enough code so others can better understand or reproduce the problem. Commented Aug 14, 2023 at 16:39
  • you will need to read the API if they provide one or to work around it with a tool like Selenium or an in-browser scripting system (though beware if you don't use their APIs you may violate their terms of service) ; for a sensible service, they might provide you an access token and some API endpoint to use it with, then you can just make a request like result = requests.post(data, headers), but you will need to read their documentation if they provide any to know the shape of the data and how to provide your header(s) (maybe just the auth token) Commented Aug 14, 2023 at 16:44
  • I can't find the url to send the post request to, I wrote the same program with selenium, but I don't know how to do it with requests. Commented Aug 14, 2023 at 18:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.