0

I want to fetch names and address of all my friends from facebook and store it in my system, Can AnyOne tell me how this can be done with html, php or anything...I don't have any idea for this..

Edited by cse.avinash

3
Contributors
12
Replies
13
Views
5 Years
Discussion Span
Last Post by pritaeas
0

You would need to learn a scripting language. You'd need to learn how to use the Facebook API, parse JSON or XML and do database actions.

0

Javascript alone is not enough, you also need to learn a server-side scripting language (ASP, ASP.NET, Perl, PHP, etc).

0

Thanks for your replies..
Actually I have to store all details of lic agents in India. Link is lic india, I have my user id and password, but there are numbers of agents and its not possible to do it manually,I think that site doesn't have an api so I dont know how to do that. I have the basic idea of php and javascript, now can u please guide me in this direction ..

0

If the site has no API it will be much more difficult. You'd need to download the correct pages, and parse them to get to the right data. You'd need to know how to use cUrl, how to use XML for starters. Not really what I consider basic.

Apart from that, are you sure you are allowed to download that information for your own use?

Edited by pritaeas

0

here I am using Curl but its not solving the problem , I am unable to login the website..
here is the code :-

<?php
$username="username"; 
$password="password"; 
$url="http://onlinelic.in/LICEPS/Login/webLogin.do"; 
 echo "praveenpuglai";
$postdata = "portlet_5_6{actionForm.userName}=".$username."&portlet_5_6{actionForm.password}=".$password; 
$cookie = "nvx1PpyV8ppRTHyCj8FYLH3vTFmrSJrnyyJH87CKHQr3hZJnfM2h!355135090";
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0");
curl_setopt($ch,CURLOPT_COOKIESESSION,true); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
curl_setopt ($ch, CURLOPT_REFERER, $url);
var_dump($ch); 
// curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); 
curl_setopt ($ch, CURLOPT_POST, 1); 
$result = curl_exec ($ch); 
 echo "praveenpuglai";
echo $result;
/*if($result != null)
{
  header('Location: http://onlinelic.in/LICEPS/appmanager/Customer/CustomerHome');  
} */ 
curl_close($ch);
?>

I think I am not continuing the session so cookies are not stored after this program is run..please check it and help me more..

0

How can I overcome that blockage...? I have my userid and password and using only that user id and password I have to log in.

0

I think I am not storing cookies information here..However I have used COOKIEJAR and $cookie should use information related to cookies, from where I can get the information.

0

i am using curl code for login on facebook but unable to get user id and profile info..
pls tell me the code

Edited by richa.chandna15

0

Next time, please start a new discussion for your question, instead of replying to an unrelated one.

You should get your information from the Facebook API documentation. If you still have issues, please start a new discussion and include your code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.