Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
Get Facebook post URL only in javascript

I want to get facebook recent post URL on my wall using pure javascript (with no use of the API).
regularly I would do that by clicking on the time/date the post was posted on and it will get load a new page including only that post.
In Javascript, the a element that will hold the last post URL would be:

let a = document.getElementsByClassName("oajrlxb2 g5ia77u1 qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 nc684nl6 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl gmql0nx0 gpro0wi8 b1v8xokw")[0];

The problem is that a.href's value (at default) will be https://www.facebook.com/#, and only when I hover over the time/date then the a.href's value will be changed to the actual recent post URL.
I tried to simulate that mouse hover by a.dispatchEvent(new Event('mouseover')) with no success.
I also collected all the eventListeners of all relevant elements of the last post by running over all the a's parents/children and getEventListeners() function, fired 'em all up with no success also.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda