import { LinkedIn } from "https://deno.land/x/linkedin/mod.ts";
// Your LinkedIn credentials
// The image and caption you want to post
const imageFilePath = "/path/to/your/image.jpg";
const caption = "Your caption goes here.";
// Log in to LinkedIn
const li = await LinkedIn.login({ email, password });
// Upload the image to LinkedIn
const image = await li.uploadImage(imageFilePath);
// Post the image with the caption
await li.postShare({ image, caption });
// Log out of LinkedIn
await li.logout();
Submitted by aahaanjokes920 588 days ago
import { LinkedIn } from "https://deno.land/x/linkedin/mod.ts";
// Your LinkedIn credentials
const email = "aahaanjokes@gmail.com";
const password = "Aadhityaa_123";
// The image and caption you want to post
const imageFilePath = "/path/to/your/image.jpg";
const caption = "Your caption goes here.";
// Log in to LinkedIn
const li = await LinkedIn.login({ email, password });
// Upload the image to LinkedIn
const image = await li.uploadImage(imageFilePath);
// Post the image with the caption
await li.postShare({ image, caption });
// Log out of LinkedIn
await li.logout();
Submitted by aahaanjokes920 588 days ago