How do I log in as myself in Facebook(PHP SDK) from my local machine? and perform tasks that are like me doing it manually? -
so far got this:
- installed wampserver on local machine downloaded php sdk ,
- extracted src/facebook localhost/app_name/ , copied the
- autoload.php localhost/app_name
i don't want set real server real app, want run locally on machine graph relationship 1 of page(s) admin. , got execute no errors (index.php)
<?php define('facebook_sdk_v4_src_dir','/wamp/www/78611337341/facebook/'); require_once("autoload.php"); use facebook\facebooksession; use facebook\facebookredirectloginhelper; use facebook\facebookcanvasloginhelper; facebooksession::setdefaultapplication('78611337341', 'actual_secret_key_goes_here'); ?>
now need login me (in code) , perform these operations: go 1 of pages created has under 200 likes, people page, , see if they're friends of each other (provided can manually see friends when manually log in , perform task myself).
basically intend build graph (this graph fictional friendship right now) maps out friendships based on liked first , others friends upper nodes page after , on each layer
any pointers appreciated... tried looking facebook access-tokens , got confused.
thanks in advance.
the global theme of tying requires user_friends
permission scope, , - user3268305 says in comment - permission scope, able friends have installed same app, and granted user_friends
permission scope.
however, original question was:
how log in myself in facebook(php sdk) local machine?
given mention of "wampserver", i'm assuming want run webapp on local machine , implement website login on machine. way visiting app's app settings @ https://developers.facebook.com/apps/your_app_id/settings/ , add "website" platform.
in site url, enter http://localhost
or similar (screen shot below). - of course - assuming don't have live , public version of app running somewhere else.
Comments
Post a Comment