Hey guys I was just wondering if someone could make or show me how to make pretty much a text to voice program on Visual Basic that whenever I get an inbox on Facebook a voice will speak over my speakers on my computer saying "Message received from [name goes here]" and if possible it will read the message out.
Is this possible?
I started trying to learn it on my own, made the sapi text to speech program but unsure how to make it detect when my Facebook receives an inbox.
Would I have to have my Facebook open at all times for this to work?
DO NOT DEAL WITH THIS MEMBER
Yes this is possible. I assume by the title prefix and the context that you are asking someone to do it for you, as "Is X possible?" questions are a subtle way of asking. Anyways, look into TTS libraries, and webrequests, and the Facebook Developer API.
(Mar 26, 2016 10:04 AM)Ninja Wrote: Yes this is possible. I assume by the title prefix and the context that you are asking someone to do it for you, as "Is X possible?" questions are a subtle way of asking. Anyways, look into TTS libraries, and webrequests, and the Facebook Developer API.
Thanks for the fast reply, I shall look into them now
Facebook doesn't have an API for messaging. There are a few unofficial ones (the most major is nodejs based, but last I checked it had quite a few bugs). Facebook make their messenger deliberately difficult to interact with using webrequests. For an example of this, fire up an HTTP debugging proxy while you have facebook messenger open and in a conversation - the number of requests and their complexity is quite high. If you're new to webrequests, I'd suggest something a bit easier.
DO NOT DEAL WITH THIS MEMBER
Mar 26, 2016 01:26 PM
(This post was last modified: Mar 26, 2016 01:27 PM by Netflix and Weed.)
(Mar 26, 2016 01:17 PM)Ingenuity Wrote: Facebook doesn't have an API for messaging. There are a few unofficial ones (the most major is nodejs based, but last I checked it had quite a few bugs). Facebook make their messenger deliberately difficult to interact with using webrequests. For an example of this, fire up an HTTP debugging proxy while you have facebook messenger open and in a conversation - the number of requests and their complexity is quite high. If you're new to webrequests, I'd suggest something a bit easier.
Yes you are right, They didn't make the API so you could interact with the messaging system but what you could do is this:
Use webrequests to login to your account (Eg: http://facebook.com/). When you get a message the HTML markup changes so you can use a background worker with a timer? (Sorry not to good at programming.) Then detect the new markup for notification and let "%" grab missing information like the name and message (Can grab with id's on the page.) Then now text to voice.
Hope I gave a little inspiration without the API. :)
Mar 26, 2016 01:44 PM
(This post was last modified: Mar 26, 2016 01:44 PM by Ingenuity.)
(Mar 26, 2016 01:26 PM)Netflix and Weed Wrote: Yes you are right, They didn't make the API so you could interact with the messaging system but what you could do is this:
Use webrequests to login to your account (Eg: http://facebook.com/). When you get a message the HTML markup changes so you can use a background worker with a timer? (Sorry not to good at programming.) Then detect the new markup for notification and let "%" grab missing information like the name and message (Can grab with id's on the page.) Then now text to voice.
Hope I gave a little inspiration without the API. :)
This couldn't be done in the way you're saying, unfortunately. If you were using webrequests to login, the responses to the webrequests would be all that you have access to - they would not change dynamically when you receive a message. As you can see below, requests to pull messages from messenger.com are pretty complex, and the responses come in some form of JSON which doesn't actually conform to the JSON spec.:
The only way that the method you mention might work is if you use a WebBrowser control, which is pretty clunky and not really a good way of doing things.
DO NOT DEAL WITH THIS MEMBER
(Mar 26, 2016 01:44 PM)Ingenuity Wrote: This couldn't be done in the way you're saying, unfortunately. If you were using webrequests to login, the responses to the webrequests would be all that you have access to - they would not change dynamically when you receive a message. As you can see below, requests to pull messages from messenger.com are pretty complex, and the responses come in some form of JSON which doesn't actually conform to the JSON spec.:
![[Image: mnNPCB.png]](https://vgy.me/mnNPCB.png)
The only way that the method you mention might work is if you use a WebBrowser control, which is pretty clunky and not really a good way of doing things.
Damn, That's weird how they come in and yea the webbrowser control is terrible. Well damn sorry, tried helping haha.
DO NOT DEAL WITH THIS MEMBER
(Mar 26, 2016 01:44 PM)Ingenuity Wrote: This couldn't be done in the way you're saying, unfortunately. If you were using webrequests to login, the responses to the webrequests would be all that you have access to - they would not change dynamically when you receive a message. As you can see below, requests to pull messages from messenger.com are pretty complex, and the responses come in some form of JSON which doesn't actually conform to the JSON spec.:
-SNIPPED IMAGE-
The only way that the method you mention might work is if you use a WebBrowser control, which is pretty clunky and not really a good way of doing things.
You can do it without webbrowser control without too much trouble too.
|