Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

91
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda