Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
can any one suggest
is there any possiblity to autologin in fb using any API in which we can pass Username or Password, APP_ID or APP_SECRET.

Reply ASAP.
-----------------------
Thanks
I have implement following code
PHP
<?php
  $app_id = "xxx";
  $app_secret = "xxxx";
  echo $app_id;
  function post_url($url, $params)
  {
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params, null, '&'));
  $ret = curl_exec($ch);
  echo $ret;
  curl_close($ch);
  return $ret;
 }
  function get_app_access_token($app_id, $secret)
  {
  $url = 'https://graph.facebook.com/oauth/access_token';
  $token_params = array("type" => "client_cred","client_id" => $app_id,"client_secret" => $secret );
  return str_replace('access_token=', '', post_url($url, $token_params));
 }
$token = get_app_access_token($app_id,$app_secret);
echo $token;
  ?>
Posted
Updated 10-Jun-15 20:38pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900