phpfacebookfacebook-graph-api

access facebook photo for matrimonial site


In my matrimonial site, i want to add the three functionality, Upload photo from local disk, upload photo and modify photo into pencil sketch, Get photo from facebook account.

i have analyzed and posted created some threads for access FB Photos. but now That suggested code are require the APPId, Security Key. but dont see any where user FB username and password.

Can you please show the right direction for this request. how to access FB photos from my site. From user end we can request only FB username and password.

Right now analyzing towards of this below snippet. even this snippet return 0 values. now my doubt is, how my APPID will use for accessing others photo album in FB.

require '../src/facebook.php';

// Create our Application instance (replace this with your appId and secret).
 $config = array();
  $config['appId'] = '109181812948600';
  $config['secret'] = 'edflmlkmlkmlkmlkmlk7079e9d5884';
  $config['fileUpload'] = false; // optional

  $facebook = new Facebook($config);
  $uid = $facebook->getUser();
  echo $uid;

Solution

  • To access profile pictures you need authentication. You can use OAuth.io for easy implementation of OAuth. For more details you can visit their website : https://oauth.io/#/docs