Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
Unable to send a message after submit it using facebook api

I'm trying to send a link directly into a user message and I write this code:

export default function App() {
  const encodeGetParams = (p) =>
    Object.entries(p)
      .map((kv) => kv.map(encodeURIComponent).join("="))
      .join("&");
  const handleClick = async () => {
    const params = {
      app_id: appid,
      link:
        "http://www.nytimes.com/interactive/2015/04/15/travel/europe-favorite-streets.html",
      redirect_uri: uri
    };
    window.open(
        `http://www.facebook.com/dialog/send?${encodeGetParams(params)}`
    );
  };
  return (
    <>
      <h3>Facebook share text</h3>
      <button onClick={handleClick}>Submit</button>
    </>
  );
}

After I chose the recipient, typing the text and submitting the message I got this error: Error

I want to use api directly because the sdk does not work on mobile devices.

Reference: https://developers.facebook.com/docs/sharing/reference/send-dialog

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!