If you let us know what you've tried, we can help fill in the gaps. Start by breaking the problem down into discrete steps and think about what nodes can help you achieve each step.
Nick
Using Node-red, how can I have function to capture an image from webcam and get it tweeted?
--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The code you link to is for capturing images from a webcam in the browser.
A Node-RED flow runs in node.js runtime, not in the browser where you are editing the flow. So that code is not going to help.
A common pattern for capturing an image from a webcam is to use the Exec node to run whatever command line tool exists to trigger the webcam, then use the file node to load whatever file that tool created.
Nick
... Or to use an http request to get a picture using a web call to the camera then a function and/or change node to setup the correct parameters for the tweet... Depends on whether the camera is network attached our local to the PC.
Sumit
Have you read the info page or the tweet node. It tells you what property the image needs to be called. So you will need a function or change node to rename the msg.payload property to msg.media
Great stuff ! Feel free to share it on flows.nodered.org !
--