
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
pinokiod
Advanced tools
First include the script
<script src="https://pinokio.localhost/x.js"></script>
Then initialize the X object
const x = new X()
Now you can make API calls to X v2 API (Without worrying about authentication). For example:
await x.tweet({ text: text })
The instantiated object x is equivalent to the client.v2 object from node-twitter-api-v2
Read the full API documentation here: https://github.com/PLhery/node-twitter-api-v2/blob/master/doc/v2.md
The authentication is automatically taken care of. You just need to make a POST request to the /connect/x/api endpoint, using ANY x.com API.
<html>
<body>
<form>
<input type='text' id='post'/>
<input type='submit'>
</form>
<script src="https://pinokio.localhost/x.js"></script>
<script>
const x = new X()
document.querySelector("form").addEventListener('submit', async (e) => {
e.preventDefault()
let text = document.querySelector("#post").value
await x.tweet({ text: text })
})
</script>
</body>
</html>
<html>
<body>
<form>
<input type='file' id='media' name='media'>
<input type='submit'>
</form>
<script src="https://pinokio.localhost/x.js"></script>
<script>
const x = new X()
document.querySelector("form").addEventListener('submit', async (e) => {
e.preventDefault()
// 1. get the uploaded file
let media = document.querySelector("#media").files[0]
// 2. determine the media_type ("tweet_gif", "tweet_image", or "tweet_video")
let type = media.type; // e.g., "image/png", "video/mp4", "image/gif"
let media_category
if (type.startsWith("image/")) {
media_category = (type === "image/gif" ? "tweet_gif" : "tweet_image");
} else if (type.startsWith("video/")) {
media_category = "tweet_video"
}
// 3. upload media
let media_id = await x.uploadMedia(media, { media_category })
// 4. post the uploaded media
let res = await x.tweet({ media: { media_ids: [media_id] }})
console.log(res)
})
</script>
</body>
</html>
FAQs
Unknown package
The npm package pinokiod receives a total of 4,365 weekly downloads. As such, pinokiod popularity was classified as popular.
We found that pinokiod demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.