Answer the question
In order to leave comments, you need to log in
Parsing an authorized FaceBook page - how?
Good day!
There is a Facebook page created by me; There are its settings and notifications that are visible only to me.
It is vital to parse these notifications into my service and display them in the interface.
The actual attempts were as follows:
include_once("simple_html_dom.php"); // Подключаю библиотеку чтобы парсить
$url2 = 'https://www.facebook.com/***/settings/?tab=notifications'; // URL для парсинга
$context2 = stream_context_create(array('http' => array('header' => 'User-Agent: Mozilla compatible \r\n' .
'Cookie: datr=***;c-user=***;xs=***;fr=***;csm=2;s=***;pl=n;lu=***;p=-2; presence=***;\r\n'))); // Закидываю куки и UserAgent
$response2 = file_get_contents($url2, false, $context2); // Получаю страницу
$html2 = str_get_html($response2); // Разбиваю страницу на элементы
foreach($html2->find('a') as $element2){
echo $element2->href . "<br>"; // Вывожу все ссылочки
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question