I have a similar issue to this question: how to get members' info by using group id in facebook?
However I'm not using the Facebook graph API.
Is it possible to get data, i.e. member names, assuming that I have the group url only?
To be more precise, I am able to login using PHP, by cURL
library at moment, but I would know if a way for this task exists.
This is my code:
$login_email = 'email';
$login_pass = 'password';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.facebook.com/login.php');
curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com");
curl_setopt($ch, CURLOPT_COOKIESESSION, false);
$login_page = curl_exec($ch) or die(curl_error($ch));
$group = file_get_contents('https://www.facebook.com/groups/****/');
echo $group;
This show me the page http://www.facebook.com instead of group page.
However, if I do
echo $login_page
it return the home page of my account(after login).
Thank you!